diff options
author | Rajesh Joseph <rjoseph@redhat.com> | 2013-08-01 12:55:51 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2014-04-14 13:56:47 -0700 |
commit | c1c7ae92a2b6bb7d57270fadd7a5d61c90fa3781 (patch) | |
tree | 54b258480dd54ee01ad113d108b2251bbccc57fe /xlators/nfs | |
parent | b0d6d20ab23627861a2d228d2124dee5e2ab9771 (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.
Backport of: http://review.gluster.org/#/c/5452/
BUG: 990887
Change-Id: I33d4b6634752333d6791b1a47ebf10c787c22120
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7478
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r-- | xlators/nfs/server/src/nlm4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index e040aa5acdb..eca107d83a1 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -941,7 +941,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; |