Date: Sun, 19 Jun 2011 02:03:13 +0000 (UTC) From: Rick Macklem <rmacklem@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: r223285 - stable/8/sys/fs/nfsclient Message-ID: <201106190203.p5J23Drw073085@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Sun Jun 19 02:03:12 2011 New Revision: 223285 URL: http://svn.freebsd.org/changeset/base/223285 Log: MFC: r222718 Fix the new NFSv4 client so that it doesn't crash when a mount is done for a VIMAGE kernel. Modified: stable/8/sys/fs/nfsclient/nfs_clport.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) Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Sun Jun 19 01:44:50 2011 (r223284) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Sun Jun 19 02:03:12 2011 (r223285) @@ -943,6 +943,7 @@ nfscl_getmyip(struct nfsmount *nmp, int sad.sin_family = AF_INET; sad.sin_len = sizeof (struct sockaddr_in); sad.sin_addr.s_addr = sin->sin_addr.s_addr; + CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred)); rt = rtalloc1((struct sockaddr *)&sad, 0, 0UL); if (rt != NULL) { if (rt->rt_ifp != NULL && @@ -956,6 +957,7 @@ nfscl_getmyip(struct nfsmount *nmp, int } RTFREE_LOCKED(rt); } + CURVNET_RESTORE(); #ifdef INET6 } else if (nmp->nm_nam->sa_family == AF_INET6) { struct sockaddr_in6 sad6, *sin6; @@ -966,6 +968,7 @@ nfscl_getmyip(struct nfsmount *nmp, int sad6.sin6_family = AF_INET6; sad6.sin6_len = sizeof (struct sockaddr_in6); sad6.sin6_addr = sin6->sin6_addr; + CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred)); rt = rtalloc1((struct sockaddr *)&sad6, 0, 0UL); if (rt != NULL) { if (rt->rt_ifp != NULL && @@ -980,6 +983,7 @@ nfscl_getmyip(struct nfsmount *nmp, int } RTFREE_LOCKED(rt); } + CURVNET_RESTORE(); #endif } return (retp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106190203.p5J23Drw073085>