linux-stable/drivers/nvme/host
Prabhath Sajeepa 412b7023b8 nvme-rdma: Avoid double freeing of async event data
[ Upstream commit 9134ae2a25 ]

The timeout of identify cmd, which is invoked as part of admin queue
creation, can result in freeing of async event data both in
nvme_rdma_timeout handler and error handling path of
nvme_rdma_configure_admin queue thus causing NULL pointer reference.
Call Trace:
 ? nvme_rdma_setup_ctrl+0x223/0x800 [nvme_rdma]
 nvme_rdma_create_ctrl+0x2ba/0x3f7 [nvme_rdma]
 nvmf_dev_write+0xa54/0xcc6 [nvme_fabrics]
 __vfs_write+0x1b/0x40
 vfs_write+0xb2/0x1b0
 ksys_write+0x61/0xd0
 __x64_sys_write+0x1a/0x20
 do_syscall_64+0x60/0x1e0
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reviewed-by: Roland Dreier <roland@purestorage.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Prabhath Sajeepa <psajeepa@purestorage.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-13 10:44:58 +02:00
..
Kconfig IB: Revert "remove redundant INFINIBAND kconfig dependencies" 2018-05-28 10:40:16 -06:00
Makefile nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
core.c nvme: Fix uninitialized-variable warning 2020-03-11 14:14:55 +01:00
fabrics.c nvme: call nvme_complete_rq when nvmf_check_ready fails for mpath I/O 2018-11-13 11:08:24 -08:00
fabrics.h nvme: if_ready checks to fail io to deleting controller 2018-07-24 13:44:40 +02:00
fault_inject.c nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
fc.c nvme-fc: fix double-free scenarios on hw queues 2020-01-09 10:18:54 +01:00
lightnvm.c lightnvm: do no update csecs and sos on 1.2 2019-11-24 08:20:51 +01:00
multipath.c nvme-multipath: Fix memory leak with ana_log_buf 2020-02-28 16:38:49 +01:00
nvme.h nvme: provide fallback for discard alloc failure 2019-12-05 09:20:04 +01:00
pci.c nvme: retain split access workaround for capability reads 2020-01-27 14:51:16 +01:00
rdma.c nvme-rdma: Avoid double freeing of async event data 2020-04-13 10:44:58 +02:00
trace.c nvme: add disk name to trace events 2018-07-24 15:55:48 +02:00
trace.h nvme: add disk name to trace events 2018-07-24 15:55:48 +02:00