[015/151] lustre: ldlm: Don't check opcode with NULL rq_reqmsg
diff mbox series

Message ID 1569869810-23848-16-git-send-email-jsimmons@infradead.org
State New
Headers show
  • lustre: update to 2.11 support
Related show

Commit Message

James Simmons Sept. 30, 2019, 6:54 p.m. UTC
From: Jeremy Filizetti <jeremy.filizetti@gmail.com>

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.

WC-bug-id: https://jira.whamcloud.com/browse/LU-7508
Lustre-commit: 3f4572caef5f ("LU-7508 ldlm: Don't check opcode with NULL rq_reqmsg")
Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Reviewed-on: http://review.whamcloud.com/17414
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
 fs/lustre/ldlm/ldlm_lib.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff mbox series

diff --git a/fs/lustre/ldlm/ldlm_lib.c b/fs/lustre/ldlm/ldlm_lib.c
index a3b8df4..04982b8 100644
--- a/fs/lustre/ldlm/ldlm_lib.c
+++ b/fs/lustre/ldlm/ldlm_lib.c
@@ -689,8 +689,12 @@  int target_pack_pool_reply(struct ptlrpc_request *req)
 		DEBUG_REQ(D_ERROR, req, "dropping reply");
 		return -ECOMM;
-	if (unlikely(lustre_msg_get_opc(req->rq_reqmsg) == MDS_REINT &&
+	/* 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 &&
 		return -ECOMM;
 	if (unlikely(rc)) {