This is a note to let you know that I've just added the patch titled block: bfq: fix bfq_set_next_ioprio_data() to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: block-bfq-fix-bfq_set_next_ioprio_data.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a680dd72ec336b81511e3bff48efac6dbfa563e7 Mon Sep 17 00:00:00 2001 From: Damien Le Moal <damien.lemoal@xxxxxxx> Date: Wed, 11 Aug 2021 12:36:57 +0900 Subject: block: bfq: fix bfq_set_next_ioprio_data() From: Damien Le Moal <damien.lemoal@xxxxxxx> commit a680dd72ec336b81511e3bff48efac6dbfa563e7 upstream. For a request that has a priority level equal to or larger than IOPRIO_BE_NR, bfq_set_next_ioprio_data() prints a critical warning but defaults to setting the request new_ioprio field to IOPRIO_BE_NR. This is not consistent with the warning and the allowed values for priority levels. Fix this by setting the request new_ioprio field to IOPRIO_BE_NR - 1, the lowest priority level allowed. Cc: <stable@xxxxxxxxxxxxxxx> Fixes: aee69d78dec0 ("block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler") Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Link: https://lore.kernel.org/r/20210811033702.368488-2-damien.lemoal@xxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5011,7 +5011,7 @@ bfq_set_next_ioprio_data(struct bfq_queu if (bfqq->new_ioprio >= IOPRIO_BE_NR) { pr_crit("bfq_set_next_ioprio_data: new_ioprio %d\n", bfqq->new_ioprio); - bfqq->new_ioprio = IOPRIO_BE_NR; + bfqq->new_ioprio = IOPRIO_BE_NR - 1; } bfqq->entity.new_weight = bfq_ioprio_to_weight(bfqq->new_ioprio); Patches currently in stable-queue which might be from damien.lemoal@xxxxxxx are queue-5.10/block-bfq-fix-bfq_set_next_ioprio_data.patch queue-5.10/blk-zoned-allow-blkreportzone-without-cap_sys_admin.patch queue-5.10/blk-zoned-allow-zone-management-send-operations-without-cap_sys_admin.patch