syzbot


WARNING in percpu_ref_exit (2)

Status: fixed on 2020/11/16 12:12
Reported-by: syzbot+8c4a14856e657b43487c@syzkaller.appspotmail.com
Fix commit: c1e2148f8ecb io_uring: free fixed_file_data after RCU grace period
First crash: 1574d, last: 1278d
Cause bisection: introduced by (bisect log) :
commit cbb537634780172137459dead490d668d437ef4d
Author: Jens Axboe <axboe@kernel.dk>
Date: Mon Dec 9 18:22:50 2019 +0000

  io_uring: avoid ring quiesce for fixed file set unregister and update

Crash: WARNING in percpu_ref_exit (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit c1e2148f8ecb26863b899d402a823dab8e26efd1
Author: Jens Axboe <axboe@kernel.dk>
Date: Wed Mar 4 14:25:50 2020 +0000

  io_uring: free fixed_file_data after RCU grace period

  
Discussions (2)
Title Replies (including bot) Last reply
WARNING in percpu_ref_exit (2) 1 (4) 2020/11/11 13:30
Re: WARNING in percpu_ref_exit (2) 2 (2) 2020/06/28 15:48
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in percpu_ref_exit fs C done 2 1575d 1575d 0/26 closed as invalid on 2019/12/20 21:58
upstream WARNING in percpu_ref_exit (3) fs 2 1093d 1120d 0/26 auto-closed as invalid on 2021/08/13 20:56

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 11156 at lib/percpu-refcount.c:111 percpu_ref_exit+0xa3/0xd0 lib/percpu-refcount.c:111
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 11156 Comm: syz-executor785 Not tainted 5.6.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x35 kernel/panic.c:582
 report_bug+0x27b/0x2f0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 fixup_bug arch/x86/kernel/traps.c:169 [inline]
 do_error_trap+0x12b/0x220 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:percpu_ref_exit+0xa3/0xd0 lib/percpu-refcount.c:111
Code: 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 1a 48 c7 43 08 03 00 00 00 5b 5d 41 5c e9 a2 f9 e3 fd e8 9d f9 e3 fd <0f> 0b eb c2 4c 89 e7 e8 41 b7 20 fe eb dc e8 ba b6 20 fe eb aa 4c
RSP: 0018:ffffc90005417c30 EFLAGS: 00010293
RAX: ffff8880a3538380 RBX: ffff888092343010 RCX: ffffffff838e195d
RDX: 0000000000000000 RSI: ffffffff838e19c3 RDI: ffff888092343028
RBP: 0000607f51636700 R08: ffff8880a3538380 R09: ffffed101246860a
R10: ffffed1012468609 R11: ffff88809234304f R12: ffff888092343018
R13: ffff8880a1c52100 R14: ffff8880a1c52000 R15: ffff8880a1c522a8
 io_sqe_files_unregister+0x8a/0x2f0 fs/io_uring.c:5344
 io_ring_ctx_free fs/io_uring.c:6338 [inline]
 io_ring_ctx_wait_and_kill+0x4bf/0xa20 fs/io_uring.c:6430
 io_uring_release+0x3e/0x50 fs/io_uring.c:6438
 __fput+0x2da/0x850 fs/file_table.c:280
 task_work_run+0x13f/0x1b0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xb59/0x2db0 kernel/exit.c:801
 do_group_exit+0x125/0x340 kernel/exit.c:899
 __do_sys_exit_group kernel/exit.c:910 [inline]
 __se_sys_exit_group kernel/exit.c:908 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:908
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4400c8
Code: 00 00 be 3c 00 00 00 eb 19 66 0f 1f 84 00 00 00 00 00 48 89 d7 89 f0 0f 05 48 3d 00 f0 ff ff 77 21 f4 48 89 d7 44 89 c0 0f 05 <48> 3d 00 f0 ff ff 76 e0 f7 d8 64 41 89 01 eb d8 0f 1f 84 00 00 00
RSP: 002b:00007ffcdaa140b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004400c8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004bf8f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d11a0 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (272):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/08 01:18 upstream 63849c8f4107 2e9971bb .config console log report syz C ci-upstream-kasan-gce
2020/03/02 22:12 upstream 63623fd44972 c88c7b75 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/28 18:39 upstream f8788d86ab28 59b57593 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/10 04:51 upstream d1ea35f4cdd4 35f5e45e .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/03/29 06:45 linux-next 770fbb32d34e 05736b29 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/03/15 10:46 linux-next 770fbb32d34e 749688d2 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/02/23 09:07 linux-next bee46b309a13 2c36e7a7 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/01/05 19:23 linux-next 7ddd09fc4b74 d646e21f .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/01/01 19:10 linux-next 7ddd09fc4b74 25a0186e .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/29 10:43 linux-next 7ddd09fc4b74 af6b8ef8 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/29 05:25 linux-next 7ddd09fc4b74 af6b8ef8 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/25 12:59 linux-next 7ddd09fc4b74 be5c2c81 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/21 01:49 linux-next 7ddd09fc4b74 bc586918 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/03/06 20:23 upstream 63623fd44972 c88c7b75 .config console log report syz ci-upstream-kasan-gce-selinux-root
2020/02/29 20:31 upstream f8788d86ab28 59b57593 .config console log report syz ci-upstream-kasan-gce-root
2020/02/08 15:51 upstream f757165705e9 06150bf1 .config console log report syz ci-upstream-kasan-gce-root
2020/02/04 00:37 upstream 754beeec1d90 93e5e335 .config console log report syz ci-upstream-kasan-gce
2020/03/27 12:53 linux-next 770fbb32d34e 7d95711b .config console log report syz ci-upstream-linux-next-kasan-gce-root
2020/10/11 22:17 upstream 3dd0130f2430 4a77ae0b .config console log report info ci-upstream-kasan-gce-selinux-root
2020/10/05 05:02 upstream 549738f15da0 5ef9c291 .config console log report info ci-upstream-kasan-gce-root
2020/09/27 04:38 upstream eeddbe6841cd 2d5ea0cb .config console log report info ci-upstream-kasan-gce-selinux-root
2020/09/15 19:08 upstream fc4f28bb3daf 6989d6f6 .config console log report info ci-upstream-kasan-gce-root
2020/09/04 05:31 upstream e28f0104343d abf9ba4f .config console log report ci-upstream-kasan-gce-root
2020/08/22 06:33 upstream cd02217a5d81 6436ce4b .config console log report ci-upstream-kasan-gce-root
2020/07/24 09:28 upstream f37e99aca03f 70c104a1 .config console log report ci-upstream-kasan-gce-selinux-root
2020/07/15 12:14 upstream e9919e11e219 f3bec699 .config console log report ci-upstream-kasan-gce-selinux-root
2020/07/01 23:59 upstream 719fdd32921f bed10395 .config console log report ci-qemu-upstream
2020/06/20 08:41 upstream 7ae77150d94d 81abc331 .config console log report ci-upstream-kasan-gce-smack-root
2020/05/27 22:32 upstream b0c3ba31be3e ec153193 .config console log report ci-upstream-kasan-gce-root
2020/05/23 07:12 upstream 444565650a5f 9682898d .config console log report ci-upstream-kasan-gce-smack-root
2020/05/22 16:35 upstream 051143e1602d 9682898d .config console log report ci-qemu-upstream
2020/05/17 12:55 upstream 5a9ffb954a39 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/04/28 23:00 upstream 3f777e19d171 e3ecea2e .config console log report ci-upstream-kasan-gce-root
2020/04/26 01:13 upstream b2768df24ec4 b8bb8e5f .config console log report ci-upstream-kasan-gce-smack-root
2020/04/24 13:32 upstream b4f633221f0a 03d97a1b .config console log report ci-upstream-kasan-gce-selinux-root
2020/04/01 13:00 upstream 56a451b78067 a34e2c33 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/23 19:56 upstream 16fbf79b0f83 84f999d6 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/16 01:08 upstream a42a7bb6f536 749688d2 .config console log report ci-upstream-kasan-gce-root
2020/03/07 22:19 upstream 63849c8f4107 2e9971bb .config console log report ci-upstream-kasan-gce
2020/03/07 18:51 upstream 63849c8f4107 2e9971bb .config console log report ci-upstream-kasan-gce-root
2020/06/25 19:08 upstream 435faf5c218a c7b4497a .config console log report ci-qemu-upstream-386
2020/02/21 12:27 upstream ca7e1fd1026c bd2a74a3 .config console log report ci-upstream-kasan-gce-386
2020/10/02 17:12 linux-next 2172e358cd17 4969d6ca .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/09/02 13:05 linux-next 4442749a2031 abf9ba4f .config console log report ci-upstream-linux-next-kasan-gce-root
2020/08/30 10:53 linux-next b36c969764ab d5a3ae1f .config console log report ci-upstream-linux-next-kasan-gce-root
2020/08/30 01:13 linux-next b36c969764ab d5a3ae1f .config console log report ci-upstream-linux-next-kasan-gce-root
2020/08/29 06:06 linux-next b36c969764ab d5a3ae1f .config console log report ci-upstream-linux-next-kasan-gce-root
2020/08/28 17:21 linux-next b36c969764ab d5a3ae1f .config console log report ci-upstream-linux-next-kasan-gce-root
2020/07/23 17:33 linux-next 4f5baedd579d 70c104a1 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/07/14 21:06 linux-next 5fb3d6042387 609fb517 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/06/04 06:31 linux-next e7b08814b16b b0d1c0d5 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/30 20:13 linux-next 770fbb32d34e c8d1cc20 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/29 15:02 linux-next 770fbb32d34e 05736b29 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/27 09:51 linux-next 770fbb32d34e 7d95711b .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/24 20:49 linux-next 770fbb32d34e 68660b21 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/22 08:58 linux-next 770fbb32d34e 78267cec .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/21 23:01 linux-next 770fbb32d34e 78267cec .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/21 17:47 linux-next 770fbb32d34e 4288d95e .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/19 16:51 linux-next 770fbb32d34e 2c31c529 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/17 23:07 linux-next 770fbb32d34e 97bc55ce .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/15 09:52 linux-next 770fbb32d34e 749688d2 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/12 20:18 linux-next 770fbb32d34e d850e9d0 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/11 22:05 linux-next 770fbb32d34e e7caca8e .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/10 12:49 linux-next 770fbb32d34e 35f53e45 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/09 21:26 linux-next 770fbb32d34e 35f53e45 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/08 12:59 linux-next 770fbb32d34e 2e9971bb .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.