OpenCloudOS-Kernel/drivers/nvme/target
Raju Rangoju 5cbab6303b nvmet-rdma: fix null dereference under heavy load
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>
2019-01-23 17:16:59 -07:00
..
Kconfig nvmet-tcp: add NVMe over TCP target driver 2018-12-13 09:58:57 +01:00
Makefile nvmet-tcp: add NVMe over TCP target driver 2018-12-13 09:58:57 +01:00
admin-cmd.c nvmet: update smart log with num err log entries 2018-12-13 09:59:07 +01:00
configfs.c nvmet: allow configfs tcp trtype configuration 2018-12-13 09:58:58 +01:00
core.c nvmet: use a macro for default error location 2018-12-18 17:50:44 +01:00
discovery.c nvmet: add error log support for fabrics-cmd 2018-12-13 09:59:04 +01:00
fabrics-cmd.c nvmet: add error log support for fabrics-cmd 2018-12-13 09:59:04 +01:00
fc.c nvmet-fc: remove the IN_ISR deferred scheduling options 2018-12-07 22:26:57 -07:00
fcloop.c nvmet-fcloop: suppress a compiler warning 2018-10-17 08:58:31 +02:00
io-cmd-bdev.c nvmet: add error log support for bdev backend 2018-12-13 09:59:05 +01:00
io-cmd-file.c nvmet: add error log support for file backend 2018-12-13 09:59:06 +01:00
loop.c nvme-fabrics: allow nvmf_connect_io_queue to poll 2018-12-18 17:50:48 +01:00
nvmet.h nvmet: use a macro for default error location 2018-12-18 17:50:44 +01:00
rdma.c nvmet-rdma: fix null dereference under heavy load 2019-01-23 17:16:59 -07:00
tcp.c nvmet-tcp: fix uninitialized variable access 2019-01-16 09:44:20 -07:00