blk-mq: fix divide by zero crash in tg_may_dispatch()
hulk inclusion category: bugfix bugzilla: 177149, https://gitee.com/openeuler/kernel/issues/I47R8R CVE: NA ----------------------------------------------- If blk-throttle is enabled and io is issued before blk_throtl_register_queue() is done. Divide by zero crash will be triggered in tg_may_dispatch() because 'throtl_slice' is uninitialized. Thus introduce a new falg QUEUE_FLAG_THROTL_INIT_DONE. It will be set after blk_throtl_register_queue() is done, and will be checked before apply any config. Signed-off-by:Yu Kuai <yukuai3@huawei.com> Reviewed-by:
Hou Tao <houtao1@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment