summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorSmith, Kyle Miller (Nimble Kernel) <kyles@hpe.com>2022-04-22 17:40:32 +0300
committerChristoph Hellwig <hch@lst.de>2022-05-16 09:06:59 +0300
commitda42761181627e9bdc37d18368b827948a583929 (patch)
treee88561a4bc64fb8b36544b0d51d57d10e679e850 /scripts/gdb/linux/utils.py
parent128126a7943622424350752a71be5bb95e7946db (diff)
downloadlinux-da42761181627e9bdc37d18368b827948a583929.tar.xz
nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
In nvme_alloc_admin_tags, the admin_q can be set to an error (typically -ENOMEM) if the blk_mq_init_queue call fails to set up the queue, which is checked immediately after the call. However, when we return the error message up the stack, to nvme_reset_work the error takes us to nvme_remove_dead_ctrl() nvme_dev_disable() nvme_suspend_queue(&dev->queues[0]). Here, we only check that the admin_q is non-NULL, rather than not an error or NULL, and begin quiescing a queue that never existed, leading to bad / NULL pointer dereference. Signed-off-by: Kyle Smith <kyles@hpe.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions