mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
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>
This commit is contained in:
parent
fd62678ab5
commit
6fbf13c0e2
1 changed files with 1 additions and 0 deletions
|
@ -4956,6 +4956,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);
|
||||
|
|
Loading…
Reference in a new issue