summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@wdc.com>2020-04-27 15:34:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-06 09:15:16 +0300
commit779f155811ebd61860a171f02183925107c4e226 (patch)
tree615adb29dad109386ef0ff924034ff7612f522be /scripts/gdb/linux/utils.py
parent57165a241302f807dfe8ab0dfd206c11a9b02da4 (diff)
downloadlinux-779f155811ebd61860a171f02183925107c4e226.tar.xz
nvme: prevent double free in nvme_alloc_ns() error handling
commit 132be62387c7a72a38872676c18b0dfae264adb8 upstream. When jumping to the out_put_disk label, we will call put_disk(), which will trigger a call to disk_release(), which calls blk_put_queue(). Later in the cleanup code, we do blk_cleanup_queue(), which will also call blk_put_queue(). Putting the queue twice is incorrect, and will generate a KASAN splat. Set the disk->queue pointer to NULL, before calling put_disk(), so that the first call to blk_put_queue() will not free the queue. The second call to blk_put_queue() uses another pointer to the same queue, so this call will still free the queue. Fixes: 85136c010285 ("lightnvm: simplify geometry enumeration") Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions