summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2017-01-09 19:44:12 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-11 15:49:36 (GMT)
commite6d53f5f8c0311032bf518d253522b73c96416f3 (patch)
tree06349ea446afed80a3c6277dd52c1f3d05e9c1ec /arch
parent952d07ac1e6e9e59267d69341c2e820710eaa718 (diff)
downloadlinux-e6d53f5f8c0311032bf518d253522b73c96416f3.tar.xz
virtio_blk: fix panic in initialization error path
[ Upstream commit 6bf6b0aa3da84a3d9126919a94c49c0fb7ee2fb3 ] If blk_mq_init_queue() returns an error, it gets assigned to vblk->disk->queue. Then, when we call put_disk(), we end up calling blk_put_queue() with the ERR_PTR, causing a bad dereference. Fix it by only assigning to vblk->disk->queue on success. Signed-off-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions