aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/rdma.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2017-03-09 13:45:52 +0200
committerJens Axboe <axboe@fb.com>2017-04-04 09:48:23 -0600
commit8d61413db604e456a3f67765752b12af3307cd9b (patch)
tree87682095b8ae53e0397a9110d67e44666eb19c02 /drivers/nvme/host/rdma.c
parentnvmet: confirm sq percpu has scheduled and switched to atomic (diff)
downloadlinux-rng-8d61413db604e456a3f67765752b12af3307cd9b.tar.xz
linux-rng-8d61413db604e456a3f67765752b12af3307cd9b.zip
nvmet-rdma: Fix a possible uninitialized variable dereference
When handling a new recv command, we grab a new rsp resource and check for the queue state being live. In case the queue is not in live state, we simply restore the rsp back to the free list. However in this flow we didn't set rsp->queue yet, so we cannot dereference it. Instead, make sure to initialize rsp->queue (and other rsp members) as soon as possible so we won't reference uninitialized variables. Reported-by: Yi Zhang <yizhan@redhat.com> Reported-by: Raju Rangoju <rajur@chelsio.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Raju Rangoju <rajur@chelsio.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions