]> git.baikalelectronics.ru Git - kernel.git/commit
paride/pf: need to set queue to NULL before put_disk
authorzhengbin <zhengbin13@huawei.com>
Tue, 13 Aug 2019 08:59:44 +0000 (16:59 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Sep 2019 13:00:33 +0000 (07:00 -0600)
commit1eaf925123cf302d159c1818b048e250e8d70b18
tree182b556cc5ec16e6e99e5e4d559461081b12ff5d
parent1398e6effbaffcc42cc8a7fd05671ce4f9fbfb45
paride/pf: need to set queue to NULL before put_disk

In pf_init_units, if blk_mq_init_sq_queue fails, need to set queue to
NULL before put_disk, otherwise null-ptr-deref Read will occur.

put_disk
  kobject_put
    disk_release
      blk_put_queue(disk->queue)

Fixes: 590238f9d47d ("paride: convert pf to blk-mq")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/paride/pf.c