projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c5b43b
)
nvme-rdma: Check that reinit_request got a proper mr
author
Sagi Grimberg
<sagi@grimberg.me>
Wed, 11 Oct 2017 12:29:09 +0000
(15:29 +0300)
committer
Christoph Hellwig
<hch@lst.de>
Wed, 18 Oct 2017 17:27:52 +0000
(19:27 +0200)
Warn if req->mr is NULL as it should never happen.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/rdma.c
b/drivers/nvme/host/rdma.c
index
221ace2
..
7e61e64
100644
(file)
--- a/
drivers/nvme/host/rdma.c
+++ b/
drivers/nvme/host/rdma.c
@@
-274,6
+274,9
@@
static int nvme_rdma_reinit_request(void *data, struct request *rq)
struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
int ret = 0;
+ if (WARN_ON_ONCE(!req->mr))
+ return 0;
+
ib_dereg_mr(req->mr);
req->mr = ib_alloc_mr(dev->pd, IB_MR_TYPE_MEM_REG,