Commit 1df7142c authored by Li Lingfeng's avatar Li Lingfeng Committed by openeuler-sync-bot
Browse files

dm: add disk before alloc dax

Offering: HULK
hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I78SWJ


CVE: NA

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

In dm_create(), alloc_dev() may trigger panic if alloc_dax() fail since
del_gendisk() will be called with add_disk() wasn't called before.

Call add_disk() before alloc_dax() to avoid it.

Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
(cherry picked from commit 6601d443)
parent 2a2202e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment