From 46af0e8dd04d01679865704e06c1037e4f30f1a3 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Fri, 8 May 2015 14:02:19 -0500 Subject: [PATCH] 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 --- lustre/ptlrpc/nrs_orr.c | 4 ++++ 1 file changed, 4 insertions(+) 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)); -- 1.8.3.1