diff options
author | Raju Rangoju <rajur@chelsio.com> | 2019-01-03 23:05:31 +0530 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-01-23 17:16:59 -0700 |
commit | 5cbab6303b4791a3e6713dfe2c5fda6a867f9adc (patch) | |
tree | 1585daaacf96e9b150e616cff6b2a1d32aaa1fc8 /drivers/memstick | |
parent | b1064d3e337b4d0b67d641b5f771187d8f1f027d (diff) | |
download | linux-5cbab6303b4791a3e6713dfe2c5fda6a867f9adc.tar.bz2 |
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>
Diffstat (limited to 'drivers/memstick')
0 files changed, 0 insertions, 0 deletions