Date: Mon, 9 Feb 2009 23:23:00 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r188425 - stable/6/sys/kern Message-ID: <200902092323.n19NN0QL074633@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Mon Feb 9 23:23:00 2009 New Revision: 188425 URL: http://svn.freebsd.org/changeset/base/188425 Log: In unp_connect(), don't unlock the global UNIX domain socket lock when UNP_CONNECTING is set, as the caller will do that. (Due to significantly different locking in 7.0 and later, this fix applies only to stable/7). PR: kern/128974 Submitted by: Larry Baird <lab at gta dot com> Modified: stable/6/sys/kern/uipc_usrreq.c Modified: stable/6/sys/kern/uipc_usrreq.c ============================================================================== --- stable/6/sys/kern/uipc_usrreq.c Mon Feb 9 22:59:22 2009 (r188424) +++ stable/6/sys/kern/uipc_usrreq.c Mon Feb 9 23:23:00 2009 (r188425) @@ -1027,10 +1027,8 @@ unp_connect(struct socket *so, struct so if (len <= 0) return (EINVAL); strlcpy(buf, soun->sun_path, len + 1); - if (unp->unp_flags & UNP_CONNECTING) { - UNP_UNLOCK(); + if (unp->unp_flags & UNP_CONNECTING) return (EALREADY); - } unp->unp_flags |= UNP_CONNECTING; UNP_UNLOCK(); sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902092323.n19NN0QL074633>