Commit e79375c9 authored by Li Lingfeng's avatar Li Lingfeng
Browse files

block: don't get gendisk if queue has not been registered

hulk inclusion
category: bugfix
bugzilla: 189153, https://gitee.com/openeuler/kernel/issues/I7XTQH


CVE: NA

----------------------------------------

Creating and using dm device at same time may trigger null-ptr-deref or
deadlock.
Some resources have not been initialized after calling add_disk in the
process of creating dm device, which means users can get device and use
some uninitialized resources.
Using uninitialized resources may trigger null-ptr-deref directly.
What's more, IO can't be finished by waiting specific resources to be
initialized and the resources can't be initialized since IO is inflight,
which triggers deadlock.

Don't get gendisk if queue has not been registered to fix this.

Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
parent 4a26557b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment