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)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 Feb 2023 13:18:46 +0000 (14:18 +0100)
commit6fbf13c0e24fd86ab2e4477cd8484a485b687421
treef37bec06abb0db4ed0b435ea3e228798cb6abd51
parentfd62678ab55cb01e11a404d302cdade222bf4022
nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set

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>
drivers/nvme/host/core.c