linux/drivers/nvme/target
Sagi Grimberg 8d61413db6 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>
2017-04-04 09:48:23 -06:00
..
admin-cmd.c sched/headers: Prepare to use <linux/rcuupdate.h> instead of <linux/rculist.h> in <linux/sched.h> 2017-03-02 08:42:38 +01:00
configfs.c nvmet: delete controllers deletion upon subsystem release 2017-01-26 17:44:22 +02:00
core.c nvmet: confirm sq percpu has scheduled and switched to atomic 2017-04-04 09:48:23 -06:00
discovery.c nvme: Use CNS as 8-bit field and avoid endianness conversion 2017-02-22 13:34:00 -07:00
fabrics-cmd.c nvmet: avoid dereferencing nvmet_req 2017-02-22 13:34:00 -07:00
fc.c nvmet_fc: cleanup of abort flag processing in fcp_op_done 2017-02-22 13:34:00 -07:00
fcloop.c nvmet/fcloop: remove some logically dead code performing redundant ret checks 2016-12-21 11:34:28 +01:00
io-cmd.c nvmet: add support for the Write Zeroes command 2016-12-01 07:58:40 -07:00
Kconfig nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
loop.c nvme-loop: handle cpu unplug when re-establishing the controller 2017-04-04 09:44:43 -06:00
Makefile nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
nvmet.h nvmet: confirm sq percpu has scheduled and switched to atomic 2017-04-04 09:48:23 -06:00
rdma.c nvmet-rdma: Fix a possible uninitialized variable dereference 2017-04-04 09:48:23 -06:00