linux/drivers/nvme/host
Roland Dreier 0a34e4668c nvme: Don't use a stack buffer for keep-alive command
In nvme_keep_alive() we pass a request with a pointer to an NVMe command on
the stack into blk_execute_rq_nowait().  However, the block layer doesn't
guarantee that the request is fully queued before blk_execute_rq_nowait()
returns.  If not, and the request is queued after nvme_keep_alive() returns,
then we'll end up using stack memory that might have been overwritten to
form the NVMe command we pass to hardware.

Fix this by keeping a special command struct in the nvme_ctrl struct right
next to the delayed work struct used for keep-alives.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
2018-02-12 22:18:14 +02:00
..
core.c nvme: Don't use a stack buffer for keep-alive command 2018-02-12 22:18:14 +02:00
fabrics.c Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block 2018-01-29 11:51:49 -08:00
fabrics.h nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING 2018-02-08 18:35:53 +02:00
fc.c nvme_fc: cleanup io completion 2018-02-11 10:45:43 +02:00
Kconfig nvme: implement multipath access to nvme subsystems 2017-11-10 19:53:25 -07:00
lightnvm.c lightnvm: make geometry structures 2.0 ready 2018-01-05 08:50:12 -07:00
Makefile nvme: add tracepoint for nvme_setup_cmd 2018-01-26 12:34:40 +01:00
multipath.c nvme/multipath: Use blk_path_error 2018-01-10 10:52:18 -07:00
nvme.h nvme: Don't use a stack buffer for keep-alive command 2018-02-12 22:18:14 +02:00
pci.c nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING 2018-02-08 18:35:53 +02:00
rdma.c nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process 2018-02-08 18:35:53 +02:00
trace.c nvme: add tracepoint for nvme_setup_cmd 2018-01-26 12:34:40 +01:00
trace.h nvme: add tracepoint for nvme_complete_rq 2018-01-26 12:34:40 +01:00