kernel-fxtec-pro1x/drivers/nvme/target
Raju Rangoju 7dbf12973d nvmet-rdma: fix null dereference under heavy load
commit 5cbab6303b4791a3e6713dfe2c5fda6a867f9adc upstream.

Under heavy load if we don't have any pre-allocated rsps left, we
dynamically allocate a rsp, but we are not actually allocating memory
for nvme_completion (rsp->req.rsp). In such a case, accessing pointer
fields (req->rsp->status) in nvmet_req_init() will result in crash.

To fix this, allocate the memory for nvme_completion by calling
nvmet_rdma_alloc_rsp()

Fixes: 8407879c("nvmet-rdma:fix possible bogus dereference under heavy load")

Cc: <stable@vger.kernel.org>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-31 08:14:41 +01:00
..
admin-cmd.c nvme: count all ANA groups for ANA Log page 2018-09-17 15:49:40 +02:00
configfs.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
core.c nvmet: free workqueue object if module init fails 2018-08-28 08:40:44 +02:00
discovery.c nvmet-rdma: support max(16KB, PAGE_SIZE) inline data 2018-07-23 09:35:16 +02:00
fabrics-cmd.c nvmet: remove duplicate NULL initialization for req->ns 2018-05-25 16:50:12 +02:00
fc.c nvmet-fc: fix target sgl list on large transfers 2018-07-24 13:44:09 +02:00
fcloop.c nvme-fcloop: Fix dropped LS's to removed target port 2018-08-28 08:40:43 +02:00
io-cmd-bdev.c nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
io-cmd-file.c nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
Kconfig nvmet-rdma: depend on INFINIBAND_ADDR_TRANS 2018-04-27 11:15:43 -04:00
loop.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
Makefile nvmet: add simple file backed ns support 2018-05-25 16:50:12 +02:00
nvmet.h nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
rdma.c nvmet-rdma: fix null dereference under heavy load 2019-01-31 08:14:41 +01:00