From: "yu kuai" <yukuai@fygo.io>
To: "lirongqing" <lirongqing@baidu.com>,
"Jens Axboe" <axboe@kernel.dk>,
"Damien Le Moal" <damien.lemoal@opensource.wdc.com>,
"Davide Zini" <davidezini2@gmail.com>,
"Paolo Valente" <paolo.valente@linaro.org>,
<linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"yu kuai" <yukuai@fygo.io>
Subject: Re: [PATCH] block, bfq: initialize active lists for all actuators
Date: Mon, 12 Oct 2026 10:13:39 +0800 [thread overview]
Message-ID: <9980eae7-e9d4-43e8-91d4-ff38e32121f2@fygo.io> (raw)
In-Reply-To: <20261005104142.1871-1-lirongqing@baidu.com>
在 2026/10/5 18:41, lirongqing 写道:
> From: Li RongQing<lirongqing@baidu.com>
>
> Commit 2d31c684a053 ("block, bfq: inject I/O to underutilized
> actuators") extended bfqd->active_list from a single list_head to an
> array indexed by actuator, but bfq_init_queue() still only initialized
> the first two entries:
>
> INIT_LIST_HEAD(&bfqd->active_list[0]);
> INIT_LIST_HEAD(&bfqd->active_list[1]);
>
> For devices with more than two independent access ranges, the remaining
> list heads stay zeroed by kzalloc() and are never set up as empty lists.
> When BFQ later adds a bfq_queue to one of those lists, list_add() writes
> through head->next, which is NULL, corrupting the list or crashing the
> kernel.
>
> Initialize every actuator's active list using bfqd->num_actuators,
> which is already set up earlier in bfq_init_queue().
>
> Fixes: 2d31c684a053 ("block, bfq: inject I/O to underutilized actuators")
> Signed-off-by: Li RongQing<lirongqing@baidu.com>
> ---
> block/bfq-iosched.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Yu Kuai <yukuai@fygo.io>
--
Thanks,
Kuai
prev parent reply other threads:[~2026-10-12 2:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 10:41 lirongqing
2026-10-07 7:10 ` Damien Le Moal
2026-10-12 2:13 ` yu kuai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9980eae7-e9d4-43e8-91d4-ff38e32121f2@fygo.io \
--to=yukuai@fygo.io \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=davidezini2@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=paolo.valente@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®