Re: [syzbot] INFO: task hung in __io_uring_cancel

From: Pavel Begunkov
Date: Fri May 07 2021 - 15:49:43 EST


On 4/20/21 2:59 AM, syzbot wrote:
> Hello,
>
> syzbot has tested the proposed patch but the reproducer is still triggering an issue:
> KASAN: null-ptr-deref Write in io_uring_cancel_sqpoll

#syz test: git://git.kernel.dk/linux-block io_uring-5.13

>
> ==================================================================
> BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
> BUG: KASAN: null-ptr-deref in atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline]
> BUG: KASAN: null-ptr-deref in io_uring_cancel_sqpoll+0x150/0x310 fs/io_uring.c:8930
> Write of size 4 at addr 0000000000000114 by task iou-sqp-31588/31596
>
> CPU: 0 PID: 31596 Comm: iou-sqp-31588 Not tainted 5.12.0-rc7-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
> __dump_stack lib/dump_stack.c:79 [inline]
> dump_stack+0x141/0x1d7 lib/dump_stack.c:120
> __kasan_report mm/kasan/report.c:403 [inline]
> kasan_report.cold+0x5f/0xd8 mm/kasan/report.c:416
> check_region_inline mm/kasan/generic.c:180 [inline]
> kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186
> instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
> atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline]
> io_uring_cancel_sqpoll+0x150/0x310 fs/io_uring.c:8930
> io_sq_thread+0x47e/0x1310 fs/io_uring.c:6873
> ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
> ==================================================================
> Kernel panic - not syncing: panic_on_warn set ...
> CPU: 1 PID: 31596 Comm: iou-sqp-31588 Tainted: G B 5.12.0-rc7-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
> __dump_stack lib/dump_stack.c:79 [inline]
> dump_stack+0x141/0x1d7 lib/dump_stack.c:120
> panic+0x306/0x73d kernel/panic.c:231
> end_report mm/kasan/report.c:102 [inline]
> end_report.cold+0x5a/0x5a mm/kasan/report.c:88
> __kasan_report mm/kasan/report.c:406 [inline]
> kasan_report.cold+0x6a/0xd8 mm/kasan/report.c:416
> check_region_inline mm/kasan/generic.c:180 [inline]
> kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186
> instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
> atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline]
> io_uring_cancel_sqpoll+0x150/0x310 fs/io_uring.c:8930
> io_sq_thread+0x47e/0x1310 fs/io_uring.c:6873
> ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
> Kernel Offset: disabled
> Rebooting in 86400 seconds..
>
>
> Tested on:
>
> commit: 734551df io_uring: fix shared sqpoll cancellation hangs
> git tree: git://git.kernel.dk/linux-block for-5.13/io_uring
> console output: https://syzkaller.appspot.com/x/log.txt?x=175fec6dd00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=601d16d8cd22e315
> dashboard link: https://syzkaller.appspot.com/bug?extid=47fc00967b06a3019bd2
> compiler:
>

--
Pavel Begunkov