]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-rdma: fix a NULL deref when an admin connect times out
authorSagi Grimberg <sagi@grimberg.me>
Wed, 24 Apr 2019 18:53:18 +0000 (11:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:23 +0000 (06:43 -0700)
commitb4e256d88eeeececb1dc353240d283fb867b397a
tree4ef0e11eb81dcbd970f1199e3aba9a248382dab4
parent12b83abc3006a9328217d451483c9e4fa99d77af
nvme-rdma: fix a NULL deref when an admin connect times out

[ Upstream commit 1007709d7d06fab09bf2d007657575958676282b ]

If we timeout the admin startup sequence we might not yet have
an I/O tagset allocated which causes the teardown sequence to crash.
Make nvme_tcp_teardown_io_queues safe by not iterating inflight tags
if the tagset wasn't allocated.

Fixes: 4c174e636674 ("nvme-rdma: fix timeout handler")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/rdma.c