This is a note to let you know that I've just added the patch titled brd: use radix_tree_maybe_preload instead of radix_tree_preload to the 6.2-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: brd-use-radix_tree_maybe_preload-instead-of-radix_tree_preload.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 0aa2988e4fd23c0c8b33999d7b47dfbc5e6bf24b Mon Sep 17 00:00:00 2001 From: Pankaj Raghav <p.raghav@xxxxxxxxxxx> Date: Fri, 17 Feb 2023 17:44:44 +0530 Subject: brd: use radix_tree_maybe_preload instead of radix_tree_preload From: Pankaj Raghav <p.raghav@xxxxxxxxxxx> commit 0aa2988e4fd23c0c8b33999d7b47dfbc5e6bf24b upstream. Unconditionally calling radix_tree_preload_end() results in a OOPS message as the preload is only conditionally called for gfpflags_allow_blocking(). [ 20.267323] BUG: using smp_processor_id() in preemptible [00000000] code: fio/416 [ 20.267837] caller is brd_insert_page.part.0+0xbe/0x190 [brd] [ 20.269436] Call Trace: [ 20.269598] <TASK> [ 20.269742] dump_stack_lvl+0x32/0x50 [ 20.269982] check_preemption_disabled+0xd1/0xe0 [ 20.270289] brd_insert_page.part.0+0xbe/0x190 [brd] [ 20.270664] brd_submit_bio+0x33f/0xf40 [brd] Use radix_tree_maybe_preload() which does preload only if gfpflags_allow_blocking() is true but also takes the lock. Therefore, unconditionally calling radix_tree_preload_end() should not create any issues and the message disappears. Fixes: 6ded703c56c2 ("brd: check for REQ_NOWAIT and set correct page allocation mask") Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20230217121442.33914-1-p.raghav@xxxxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/block/brd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -94,7 +94,7 @@ static int brd_insert_page(struct brd_de if (!page) return -ENOMEM; - if (gfpflags_allow_blocking(gfp) && radix_tree_preload(gfp)) { + if (radix_tree_maybe_preload(gfp)) { __free_page(page); return -ENOMEM; } Patches currently in stable-queue which might be from p.raghav@xxxxxxxxxxx are queue-6.2/brd-use-radix_tree_maybe_preload-instead-of-radix_tree_preload.patch queue-6.2/brd-mark-as-nowait-compatible.patch