Files
Omar Sandoval 874f22658c virtio_blk: fix panic in initialization error path
[ Upstream commit 6bf6b0aa3d ]

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>
2017-08-11 09:08:58 -07:00
..
2016-04-12 09:08:53 -07:00
2011-08-08 11:40:15 +02:00
2005-04-16 15:20:36 -07:00
2014-08-08 15:57:28 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2017-03-12 06:37:27 +01:00
2015-09-23 11:01:16 -06:00
2013-11-08 09:10:30 -07:00
2009-03-26 21:15:27 +01:00