Whamcloud - gitweb
LU-6558 ptlrpc: handle NULL export in nrs_orr_key_fill() 37/14737/3
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 8 May 2015 19:02:19 +0000 (14:02 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 May 2015 17:17:15 +0000 (17:17 +0000)
In nrs_orr_key_fill() the request export may be NULL so avoid
dereferencing it.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7f0a3a898586eb49ae7c1fadd9118759179280b9
Reviewed-on: http://review.whamcloud.com/14737
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/nrs_orr.c

index 982fafa..74578c5 100644 (file)
@@ -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));