在 2022/12/9 19:57, Guoqing Jiang 写道:
On 12/7/22 6:37 PM, Zheng Zengkai wrote:
From: Li Nan linan122@huawei.com
hulk inclusion category: bugfix bugzilla: 187584, https://gitee.com/openeuler/kernel/issues/I5QW2R CVE: NA
This reverts commit 36f5d7662495aa5ad4ec197443e69e01384eda3c.
There are two wbt_enable_default() in bfq_exit_queue(). Although it will not lead to no fault, revert one.
Signed-off-by: Li Nan linan122@huawei.com Reviewed-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com
block/bfq-iosched.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 4bfea5e5354e..1aec01c0a707 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -6418,8 +6418,6 @@ static void bfq_exit_queue(struct elevator_queue *e) spin_unlock_irq(&bfqd->lock); #endif - wbt_enable_default(bfqd->queue);
kfree(bfqd); /* Re-enable throttling in case elevator disabled it */
我怀疑应该删除kfree下面的wbt_enable_default而不是kfree上面的. BTW,现在的代码是这样的
static void bfq_exit_queue(struct elevator_queue *e) { struct bfq_data *bfqd = e->elevator_data; struct bfq_queue *bfqq, *n; struct request_queue *q = bfqd->queue;
...
kfree(bfqd);
/* Re-enable throttling in case elevator disabled it */ wbt_enable_default(q); }
Just FYI,
Thanks, Guoqing _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org
两个wbt_enable_default()通过两个补丁引入: 35328115880f ("block/wbt: fix negative inflight counter when remove scsi device") 36f5d7662495 ("block/wbt: fix negative inflight counter when remove scsi device")
需要revert其中的一个。 35328115880f删除了elv_unregister_queue()中的wbt_enable_default(),并且定 义了局部变量q,若revert它则36f5d7662495 也会失效。并且wbt_enable_default 和kfree的位置关系并不关键,所以我们选择了revert 36f5d7662495。
Thanks, Nan