]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set
authorMaurizio Lombardi <mlombard@redhat.com>
Tue, 31 Jan 2023 16:38:42 +0000 (17:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:44 +0000 (12:59 +0100)
commit53fb698a8a280f33e43b5847d653b595b97e3947
tree8f1166f515e1643b227043cd5d94bbe4cf54e63c
parent84ea5242b723573d1bc78049128a8b61d2c60465
nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set

[ Upstream commit 6fbf13c0e24fd86ab2e4477cd8484a485b687421 ]

In nvme_alloc_io_tag_set(), the connect_q pointer should be set to NULL
in case of error to avoid potential invalid pointer dereferences.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c