Author: bz Date: Sat Mar 27 17:42:04 2010 New Revision: 205758 URL: http://svn.freebsd.org/changeset/base/205758
Log: MFC r204147: 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) Modified: stable/8/sys/kern/uipc_socket.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/uipc_socket.c ============================================================================== --- stable/8/sys/kern/uipc_socket.c Sat Mar 27 17:40:28 2010 (r205757) +++ stable/8/sys/kern/uipc_socket.c Sat Mar 27 17:42:04 2010 (r205758) @@ -764,6 +764,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 @@ -779,10 +781,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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"