Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0393aad authored by zhengbin's avatar zhengbin Committed by Greg Kroah-Hartman
Browse files

block: fix NULL pointer dereference in register_disk



commit 4d7c1d3fd7c7eda7dea351f071945e843a46c145 upstream.

If __device_add_disk-->bdi_register_owner-->bdi_register-->
bdi_register_va-->device_create_vargs fails, bdi->dev is still
NULL, __device_add_disk-->register_disk will visit bdi->dev->kobj.
This patch fixes that.

Signed-off-by: default avatarzhengbin <zhengbin13@huawei.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJack Wang <jinpu.wang@cloud.ionos.com>
parent 960434ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment