Date: Sat, 20 Feb 2010 22:29:28 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r204147 - head/sys/kern Message-ID: <201002202229.o1KMTSpW036802@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Sat Feb 20 22:29:28 2010 New Revision: 204147 URL: http://svn.freebsd.org/changeset/base/204147 Log: Set curvnet earlier so that it also covers calls to sodisconnect(), which before were possibly panicing the system in ULP code in the VIMAGE case. Submitted by: Igor (igor ispsystem.com) MFC after: 5 days Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sat Feb 20 22:24:24 2010 (r204146) +++ head/sys/kern/uipc_socket.c Sat Feb 20 22:29:28 2010 (r204147) @@ -773,6 +773,8 @@ soconnect(struct socket *so, struct sock if (so->so_options & SO_ACCEPTCONN) return (EOPNOTSUPP); + + CURVNET_SET(so->so_vnet); /* * If protocol is connection-based, can only connect once. * Otherwise, if connected, try to disconnect first. This allows @@ -788,10 +790,9 @@ soconnect(struct socket *so, struct sock * biting us. */ so->so_error = 0; - CURVNET_SET(so->so_vnet); error = (*so->so_proto->pr_usrreqs->pru_connect)(so, nam, td); - CURVNET_RESTORE(); } + CURVNET_RESTORE(); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002202229.o1KMTSpW036802>