svn commit: r287338 - stable/10/sys/rpc
Xin LI
delphij at FreeBSD.org
Tue Sep 1 01:01:36 UTC 2015
Author: delphij
Date: Tue Sep 1 01:01:35 2015
New Revision: 287338
URL: https://svnweb.freebsd.org/changeset/base/287338
Log:
MFC r286894:
Set curvnet context inside the RPC code in more places.
Reviewed by: melifaro
Modified:
stable/10/sys/rpc/rpc_generic.c
stable/10/sys/rpc/svc_vc.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/rpc/rpc_generic.c
==============================================================================
--- stable/10/sys/rpc/rpc_generic.c Mon Aug 31 23:10:42 2015 (r287337)
+++ stable/10/sys/rpc/rpc_generic.c Tue Sep 1 01:01:35 2015 (r287338)
@@ -703,7 +703,9 @@ __rpc_sockisbound(struct socket *so)
struct sockaddr *sa;
int error, bound;
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
return (0);
@@ -791,7 +793,9 @@ bindresvport(struct socket *so, struct s
socklen_t salen;
if (sa == NULL) {
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
return (error);
freesa = TRUE;
Modified: stable/10/sys/rpc/svc_vc.c
==============================================================================
--- stable/10/sys/rpc/svc_vc.c Mon Aug 31 23:10:42 2015 (r287337)
+++ stable/10/sys/rpc/svc_vc.c Tue Sep 1 01:01:35 2015 (r287338)
@@ -150,7 +150,9 @@ svc_vc_create(SVCPOOL *pool, struct sock
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 sock
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
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;
More information about the svn-src-stable-10
mailing list