Whamcloud - gitweb
LU-7508 ldlm: Don't check opcode with NULL rq_reqmsg 14/17414/2
authorJeremy Filizetti <jeremy.filizetti@gmail.com>
Tue, 1 Dec 2015 19:54:10 +0000 (14:54 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 9 Dec 2015 02:26:53 +0000 (02:26 +0000)
When GSS is enabled it's possible to have a NULL rq_reqmsg
if a bad signature or no context is returned during the unwrap
of the request.  Don't check the opcode in this case.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Change-Id: I3a74dff7638b318190c5c4ad73acbe7ec299aa80
Reviewed-on: http://review.whamcloud.com/17414
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/ldlm/ldlm_lib.c

index c2f2b82..0ded843 100644 (file)
@@ -2757,8 +2757,11 @@ static int target_send_reply_msg(struct ptlrpc_request *req,
                DEBUG_REQ(D_ERROR, req, "dropping reply");
                return -ECOMM;
        }
-       if (unlikely(lustre_msg_get_opc(req->rq_reqmsg) == MDS_REINT &&
-                    OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_MULTI_NET_REP)))
+       /* We can have a null rq_reqmsg in the event of bad signature or
+        * no context when unwrapping */
+       if (req->rq_reqmsg &&
+           unlikely(lustre_msg_get_opc(req->rq_reqmsg) == MDS_REINT &&
+           OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_MULTI_NET_REP)))
                return -ECOMM;
 
        if (unlikely(rc)) {