Re: WARNING in __percpu_ref_exit

From: Pavel Begunkov
Date: Wed Dec 23 2020 - 18:16:10 EST


On 02/12/2020 13:01, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 0eedceaf Add linux-next specific files for 20201201
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=1649b753500000
> kernel config: https://syzkaller.appspot.com/x/.config?x=55aec7153b7827ea
> dashboard link: https://syzkaller.appspot.com/bug?extid=482debb49aa7d7fa0b09
> compiler: gcc (GCC) 10.1.0-syz 20200507
>
> Unfortunately, I don't have any reproducer for this issue yet.

#syz dup: WARNING in percpu_ref_kill_and_confirm (2)

>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+482debb49aa7d7fa0b09@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 28 at lib/percpu-refcount.c:112 __percpu_ref_exit+0x98/0x100 lib/percpu-refcount.c:112
> Modules linked in:
> CPU: 0 PID: 28 Comm: kworker/u4:2 Not tainted 5.10.0-rc6-next-20201201-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Workqueue: events_unbound io_ring_exit_work
> RIP: 0010:__percpu_ref_exit+0x98/0x100 lib/percpu-refcount.c:112
> Code: fd 49 8d 7c 24 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 61 49 83 7c 24 10 00 74 07 e8 d8 63 b7 fd <0f> 0b e8 d1 63 b7 fd 48 89 ef e8 a9 a0 e5 fd 48 89 da 48 b8 00 00
> RSP: 0018:ffffc90000e2fc88 EFLAGS: 00010293
> RAX: 0000000000000000 RBX: ffff88807373f000 RCX: 0000000000000000
> RDX: ffff888010f51ac0 RSI: ffffffff83b95d78 RDI: ffff88801b826810
> RBP: 0000607f45e7fde8 R08: 0000000000000000 R09: ffffffff8ebd389f
> R10: ffffffff83b95d18 R11: 0000000000000000 R12: ffff88801b826800
> R13: 0000000000000000 R14: ffff88801b826800 R15: ffff88805c6135a8
> FS: 0000000000000000(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000055c9d3e62ebc CR3: 00000000728e6000 CR4: 00000000001506f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> percpu_ref_exit+0x3b/0x140 lib/percpu-refcount.c:133
> io_ring_ctx_free fs/io_uring.c:8517 [inline]
> io_ring_exit_work+0x4fa/0x7a0 fs/io_uring.c:8581
> process_one_work+0x98d/0x15f0 kernel/workqueue.c:2272
> worker_thread+0x64c/0x1120 kernel/workqueue.c:2418
> kthread+0x3b1/0x4a0 kernel/kthread.c:292
> ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
>
>
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
>

--
Pavel Begunkov