From: John L. Hammond Date: Fri, 8 May 2015 19:02:19 +0000 (-0500) Subject: LU-6558 ptlrpc: handle NULL export in nrs_orr_key_fill() X-Git-Tag: 2.7.54~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=46af0e8dd04d01679865704e06c1037e4f30f1a3;p=fs%2Flustre-release.git LU-6558 ptlrpc: handle NULL export in nrs_orr_key_fill() In nrs_orr_key_fill() the request export may be NULL so avoid dereferencing it. Signed-off-by: John L. Hammond Change-Id: I7f0a3a898586eb49ae7c1fadd9118759179280b9 Reviewed-on: http://review.whamcloud.com/14737 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Chris Horn Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c index 982fafa..74578c5 100644 --- a/lustre/ptlrpc/nrs_orr.c +++ b/lustre/ptlrpc/nrs_orr.c @@ -154,6 +154,10 @@ static int nrs_orr_key_fill(struct nrs_orr_data *orrd, return 0; } + /* Bounce unconnected requests to the default policy. */ + if (req->rq_export == NULL) + return -ENOTCONN; + if (nrq->nr_u.orr.or_orr_set || nrq->nr_u.orr.or_trr_set) memset(&nrq->nr_u.orr.or_key, 0, sizeof(nrq->nr_u.orr.or_key));