aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/lock_debug.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2025-04-09 01:14:41 +0000
committerJens Axboe <[email protected]>2025-04-09 13:44:49 +0000
commit6ee6bd5d4fce502a5b5a2ea805e9ff16e6aa890f (patch)
tree149500d1b1806300959ea2e69005d93a6718508d /net/core/lock_debug.c
parentselftests: ublk: fix test_stripe_04 (diff)
downloadkernel-6ee6bd5d4fce502a5b5a2ea805e9ff16e6aa890f.tar.gz
kernel-6ee6bd5d4fce502a5b5a2ea805e9ff16e6aa890f.zip
ublk: fix handling recovery & reissue in ublk_abort_queue()
Commit 8284066946e6 ("ublk: grab request reference when the request is handled by userspace") doesn't grab request reference in case of recovery reissue. Then the request can be requeued & re-dispatch & failed when canceling uring command. If it is one zc request, the request can be freed before io_uring returns the zc buffer back, then cause kernel panic: [ 126.773061] BUG: kernel NULL pointer dereference, address: 00000000000000c8 [ 126.773657] #PF: supervisor read access in kernel mode [ 126.774052] #PF: error_code(0x0000) - not-present page [ 126.774455] PGD 0 P4D 0 [ 126.774698] Oops: Oops: 0000 [#1] SMP NOPTI [ 126.775034] CPU: 13 UID: 0 PID: 1612 Comm: kworker/u64:55 Not tainted 6.14.0_blk+ #182 PREEMPT(full) [ 126.775676] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014 [ 126.776275] Workqueue: iou_exit io_ring_exit_work [ 126.776651] RIP: 0010:ublk_io_release+0x14/0x130 [ublk_drv] Fixes it by always grabbing request reference for aborting the request. Reported-by: Caleb Sander Mateos <[email protected]> Closes: https://lore.kernel.org/linux-block/CADUfDZodKfOGUeWrnAxcZiLT+puaZX8jDHoj_sfHZCOZwhzz6A@mail.gmail.com/ Fixes: 8284066946e6 ("ublk: grab request reference when the request is handled by userspace") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/core/lock_debug.c')
0 files changed, 0 insertions, 0 deletions