Commit 4ee1fb09 authored by Yu Kuai's avatar Yu Kuai Committed by Yongqiang Liu
Browse files

blk-mq: handle bio after queue is initialized

hulk inclusion
category: bugfix
bugzilla: 187345, https://gitee.com/openeuler/kernel/issues/I5KZZ0


CVE: NA

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

Otherwise, null pointer crash can be triggered to handle bio in
blk_mq_submit_bio() while queue is not initialized.

Since queue is registered right after initialization, use the flag
'QUEUE_FLAG_REGISTERED' to make sure queue is initialized, althrough
this will delay a little when bio can be handled, it doesn't hurt in
real user case.

Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent a11882b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment