summaryrefslogtreecommitdiffstats
path: root/sys/rpc/svc_vc.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-09-01 01:01:35 +0000
committerdelphij <delphij@FreeBSD.org>2015-09-01 01:01:35 +0000
commit11ccde281407ee27640bcbb97e28aa895001cacd (patch)
treeaf0b5fcdd8310067098d6866e562f864a5357491 /sys/rpc/svc_vc.c
parent9591838e19776140c1c33e3eed83f41da431f5d3 (diff)
downloadFreeBSD-src-11ccde281407ee27640bcbb97e28aa895001cacd.zip
FreeBSD-src-11ccde281407ee27640bcbb97e28aa895001cacd.tar.gz
MFC r286894:
Set curvnet context inside the RPC code in more places. Reviewed by: melifaro
Diffstat (limited to 'sys/rpc/svc_vc.c')
-rw-r--r--sys/rpc/svc_vc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c
index fb40a34..be8e04e 100644
--- a/sys/rpc/svc_vc.c
+++ b/sys/rpc/svc_vc.c
@@ -150,7 +150,9 @@ svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
SOCK_LOCK(so);
if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) {
SOCK_UNLOCK(so);
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
return (NULL);
xprt = svc_vc_create_conn(pool, so, sa);
@@ -167,7 +169,9 @@ svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
xprt->xp_p2 = NULL;
xprt->xp_ops = &svc_vc_rendezvous_ops;
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error) {
goto cleanup_svc_vc_create;
}
@@ -249,7 +253,9 @@ svc_vc_create_conn(SVCPOOL *pool, struct socket *so, struct sockaddr *raddr)
memcpy(&xprt->xp_rtaddr, raddr, raddr->sa_len);
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
goto cleanup_svc_vc_create;
OpenPOWER on IntegriCloud