diff options
author | Raju Rangoju <rajur@chelsio.com> | 2019-01-03 23:05:31 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-31 08:12:37 +0100 |
commit | f63ee3bb14a6aee5c1312ab716a72c2e37a42d2e (patch) | |
tree | cd262aa546b66aaea6153642590e72604408d101 /fs/btrfs/dev-replace.c | |
parent | 8d1ee2d54d41e9077405e2eac6abdbba0867562f (diff) | |
download | linux-f63ee3bb14a6aee5c1312ab716a72c2e37a42d2e.tar.gz linux-f63ee3bb14a6aee5c1312ab716a72c2e37a42d2e.tar.bz2 linux-f63ee3bb14a6aee5c1312ab716a72c2e37a42d2e.zip |
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>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions