Date: Mon, 2 Apr 2012 18:52:52 +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-9@freebsd.org Subject: svn commit: r233801 - stable/9/sys/kern Message-ID: <201204021852.q32Iqq0V011384@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Mon Apr 2 18:52:52 2012 New Revision: 233801 URL: http://svn.freebsd.org/changeset/base/233801 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/9/sys/kern/uipc_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Mon Apr 2 18:31:01 2012 (r233800) +++ stable/9/sys/kern/uipc_usrreq.c Mon Apr 2 18:52:52 2012 (r233801) @@ -1272,8 +1272,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?201204021852.q32Iqq0V011384>