diff options
| author | Li RongQing <lirongqing@baidu.com> | 2026-10-19 13:11:37 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-19 13:26:28 -0600 |
| commit | 00c2c34ead7e84d6594e20fa37a3c503823f5756 (patch) | |
| tree | 5b635720dd4fa0a89b1c210f0358ef1a637b2951 /include/linux/debugobjects.h | |
| parent | bdfc6433b2d9433edefa17c5c779fe658356bd3b (diff) | |
block, bfq: initialize active lists for all actuators
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>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Yu Kuai <yukuai@fygo.io>
Link: https://patch.msgid.link/20261019051137.1715-1-lirongqing@baidu.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
