Date: Mon, 2 Apr 2012 18:54:10 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r233802 - stable/8/sys/kern Message-ID: <201204021854.q32IsASe011471@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Mon Apr 2 18:54:10 2012 New Revision: 233802 URL: http://svn.freebsd.org/changeset/base/233802 Log: MFC r231976: unp_connect() may use a shared lock on the vnode to fetch the socket. Suggested by: jhb Reviewed by: jhb, kib, rwatson Modified: stable/8/sys/kern/uipc_usrreq.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/uipc_usrreq.c ============================================================================== --- stable/8/sys/kern/uipc_usrreq.c Mon Apr 2 18:52:52 2012 (r233801) +++ stable/8/sys/kern/uipc_usrreq.c Mon Apr 2 18:54:10 2012 (r233802) @@ -1188,8 +1188,8 @@ unp_connect(struct socket *so, struct so UNP_PCB_UNLOCK(unp); sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF, UIO_SYSSPACE, buf, - td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKSHARED | LOCKLEAF, + UIO_SYSSPACE, buf, td); error = namei(&nd); if (error) vp = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204021854.q32IsASe011471>