提交 6ff52765 编写于 作者: L Li Nan 提交者: openeuler-sync-bot

block: fix order error in blk_release_queue

hulk inclusion
category: bugfix, https://gitee.com/openeuler/kernel/issues/I64SY5
bugzilla: 188093
CVE: NA

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

blk_stat_free_callback() will check stats->callbacks, and wbt's callback
is freed in wbt_exit(), which is called by rq_qos_exit(). So move it in
front of blk_stat_free_callback().

Fixes: 015466fc61f4 ("block: fix null-pointer dereference in ioc_pd_init")
Signed-off-by: NLi Nan <linan122@huawei.com>
(cherry picked from commit e539db97)
上级 74874f22
......@@ -786,14 +786,14 @@ static void blk_release_queue(struct kobject *kobj)
might_sleep();
rq_qos_exit(q);
if (test_bit(QUEUE_FLAG_POLL_STATS, &q->queue_flags))
blk_stat_remove_callback(q, q->poll_cb);
blk_stat_free_callback(q->poll_cb);
blk_free_queue_stats(q->stats);
rq_qos_exit(q);
blk_exit_queue(q);
blk_queue_free_zone_bitmaps(q);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册