Skip to contentSkip to conversation

knfds: map null socket to SOCK_STREAM in svcauth_unix

RFC PATCH In review Tom Tucker 1 participant 1 message May 18, 2007

Subsystems (3)
lore
Share & tools
lore

Tom Tucker

author
#0 lore raw

RFC PATCH 8/15 knfds: map null socket to SOCK_STREAM in svcauth_unix

The ip_map_cached_put routine looks in the sk_sock structure to determine the connection type. This change maps a null socket (RMDA transport) to SOCK_STREAM.

---

 net/sunrpc/svcauth_unix.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/svcauth_unix.c +1 -1
index 2bd23ea..4d6bba0 100644
@@ -411,7 +411,7 @@ ip_map_cached_put(struct svc_rqst *rqstp
 	struct svc_sock *svsk = rqstp->rq_sock;
 
 	spin_lock_bh(&svsk->sk_defer_lock);
-	if (svsk->sk_sock->type == SOCK_STREAM &&
+	if ((svsk->sk_sock==NULL || svsk->sk_sock->type == SOCK_STREAM) &&
 	    svsk->sk_info_authunix == NULL) {
 		/* newly cached, keep the reference */
 		svsk->sk_info_authunix = ipm;

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs