diff options
author | Maurizio Lombardi | 2023-01-31 17:38:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-02-22 12:59:44 +0100 |
commit | 53fb698a8a280f33e43b5847d653b595b97e3947 (patch) | |
tree | 8f1166f515e1643b227043cd5d94bbe4cf54e63c /drivers/nvme | |
parent | 84ea5242b723573d1bc78049128a8b61d2c60465 (diff) |
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e189ce17deb3..5acc9ae225df 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4933,6 +4933,7 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set, out_free_tag_set: blk_mq_free_tag_set(set); + ctrl->connect_q = NULL; return ret; } EXPORT_SYMBOL_GPL(nvme_alloc_io_tag_set); |