diff options
author | Raju Rangoju <rajur@chelsio.com> | 2019-01-03 20:35:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-31 10:14:41 +0300 |
commit | 7dbf12973d536a226acf5e18ab9ed6ff6364c876 (patch) | |
tree | e7b66024bd5a5e513804ed18cc19f9cd5a7ffd62 /scripts/gdb/linux/proc.py | |
parent | fa9184be67a6c2f3d9ae38a832aa061c33c853cc (diff) | |
download | linux-7dbf12973d536a226acf5e18ab9ed6ff6364c876.tar.xz |
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 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions