From: Jeremy Filizetti Date: Tue, 1 Dec 2015 19:54:10 +0000 (-0500) Subject: LU-7508 ldlm: Don't check opcode with NULL rq_reqmsg X-Git-Tag: 2.7.65~90 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=3f4572caef5f25f4a9b5347b2ccf933fdad9db9c;p=fs%2Flustre-release.git LU-7508 ldlm: Don't check opcode with NULL rq_reqmsg 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 Change-Id: I3a74dff7638b318190c5c4ad73acbe7ec299aa80 Reviewed-on: http://review.whamcloud.com/17414 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: John L. Hammond --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index c2f2b82..0ded843 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -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)) {