summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2013-08-01 12:55:51 +0530
committerVijay Bellur <vbellur@redhat.com>2013-08-01 09:53:48 -0700
commit6235e8e956ce6d72c88ddb3ad81c0842ee4d089c (patch)
treeacf07aa1d8464205f81e7f15b1498203dbe95a5c
parentee98605f961c82a8f76ece4fae228bf4ddfed4c4 (diff)
nfs: Fix for NFS crash during blocking NLM call.
Bug 990887: During a blocking NLM call NFS server is crashing. Cause: When nlm4_establish_callback function is called from nlm4svc_send_granted the cs->req->trans pointer is NULL. Thus using this pointer will result in a crash. Whereas cs->trans points to a valid transport object. NLM should use cs->trans instead of cs->req->trans. Fix: Replaced cs->req->trans with cs->trans. Change-Id: I425e48e0aafc9a6c130912edf2e801d8c4c9472d BUG: 990887 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/5452 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/nfs/server/src/nlm4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
index 041e4317acc..ea8ca05ec29 100644
--- a/xlators/nfs/server/src/nlm4.c
+++ b/xlators/nfs/server/src/nlm4.c
@@ -956,7 +956,7 @@ nlm4_establish_callback (void *csarg)
case AF_INET:
inet_ntop (AF_INET, &sock_union.sin.sin_addr, peerip,
INET6_ADDRSTRLEN+1);
- inet_ntop (AF_INET, &(((struct sockaddr_in *)&cs->req->trans->myinfo.sockaddr)->sin_addr),
+ inet_ntop (AF_INET, &(((struct sockaddr_in *)&cs->trans->myinfo.sockaddr)->sin_addr),
myip, INET6_ADDRSTRLEN + 1);
break;