diff options
author | 2017-01-09 11:44:12 -0800 | |
---|---|---|
committer | 2017-01-10 13:30:50 -0700 | |
commit | 6bf6b0aa3da84a3d9126919a94c49c0fb7ee2fb3 (patch) | |
tree | 4f7b1d400af13e0b087ee14116b5a56d840d1c2a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | nbd: blk_mq_init_queue returns an error code on failure, not NULL (diff) | |
download | linux-dev-6bf6b0aa3da84a3d9126919a94c49c0fb7ee2fb3.tar.xz linux-dev-6bf6b0aa3da84a3d9126919a94c49c0fb7ee2fb3.zip |
virtio_blk: fix panic in initialization error path
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions