syzbot


INFO: trying to register non-static key in io_cqring_ev_posted (2)

Status: fixed on 2020/05/10 10:42
Reported-by: syzbot+0c3370f235b74b3cfd97@syzkaller.appspotmail.com
Fix commit: 10bea96dcc13 io_uring: add missing finish_wait() in io_sq_thread()
First crash: 862d, last: 825d

Cause bisection: introduced by (bisect log) :
commit b41e98524e424d104aa7851d54fd65820759875a
Author: Jens Axboe <axboe@kernel.dk>
Date: Mon Feb 17 16:52:41 2020 +0000

  io_uring: add per-task callback handler

Crash: INFO: trying to register non-static key in io_cqring_ev_posted (log)
Repro: C syz .config
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: trying to register non-static key in io_cqring_ev_posted (3) C done 3 813d 815d 17/23 fixed on 2020/07/17 17:58
upstream INFO: trying to register non-static key in io_cqring_ev_posted C done 6 987d 999d 16/23 fixed on 2019/12/13 00:31

Sample crash report:
RSP: 002b:00007ffe08a3a528 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004412a9
RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000910
RBP: 000000000000acfd R08: 0000000000000001 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004021f0
R13: 0000000000402280 R14: 0000000000000000 R15: 0000000000000000
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 7017 Comm: syz-executor095 Not tainted 5.6.0-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+0x1e9/0x30e lib/dump_stack.c:118
 register_lock_class+0x76a/0x1000 kernel/locking/lockdep.c:472
 __lock_acquire+0x102/0x2b90 kernel/locking/lockdep.c:4223
 lock_acquire+0x169/0x480 kernel/locking/lockdep.c:4923
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x9e/0xc0 kernel/locking/spinlock.c:159
 __wake_up_common_lock kernel/sched/wait.c:122 [inline]
 __wake_up+0xb8/0x150 kernel/sched/wait.c:142
 io_cqring_ev_posted+0x9f/0x1c0 fs/io_uring.c:1150
 io_poll_remove_all fs/io_uring.c:4343 [inline]
 io_ring_ctx_wait_and_kill+0x537/0xfd0 fs/io_uring.c:7223
 io_uring_create fs/io_uring.c:7761 [inline]
 io_uring_setup fs/io_uring.c:7788 [inline]
 __do_sys_io_uring_setup fs/io_uring.c:7801 [inline]
 __se_sys_io_uring_setup+0x1e49/0x2650 fs/io_uring.c:7798
 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4412a9
Code: e8 5c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe08a3a528 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004412a9
RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000910
RBP: 000000000000acfd R08: 0000000000000001 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004021f0
R13: 0000000000402280 R14: 0000000000000000 R15: 0000000000000000
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 7017 Comm: syz-executor095 Not tainted 5.6.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__wake_up_common+0x297/0x4d0 kernel/sched/wait.c:86
Code: fb 01 00 00 45 31 f6 eb 13 66 2e 0f 1f 84 00 00 00 00 00 4d 39 fc 0f 84 e3 01 00 00 4c 89 fb 49 8d 6f e8 4c 89 f8 48 c1 e8 03 <80> 3c 10 00 74 12 48 89 df e8 6b b5 59 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc900043e7c00 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000003 RDI: ffff8880a6860120
RBP: ffffffffffffffe8 R08: 0000000000000000 R09: ffffc900043e7c68
R10: fffff5200087cf80 R11: 0000000000000000 R12: ffff8880a6860160
R13: 1ffff9200087cf8d R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000afd880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000a6821000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __wake_up_common_lock kernel/sched/wait.c:123 [inline]
 __wake_up+0xd4/0x150 kernel/sched/wait.c:142
 io_cqring_ev_posted+0x9f/0x1c0 fs/io_uring.c:1150
 io_poll_remove_all fs/io_uring.c:4343 [inline]
 io_ring_ctx_wait_and_kill+0x537/0xfd0 fs/io_uring.c:7223
 io_uring_create fs/io_uring.c:7761 [inline]
 io_uring_setup fs/io_uring.c:7788 [inline]
 __do_sys_io_uring_setup fs/io_uring.c:7801 [inline]
 __se_sys_io_uring_setup+0x1e49/0x2650 fs/io_uring.c:7798
 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4412a9
Code: e8 5c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe08a3a528 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004412a9
RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000910
RBP: 000000000000acfd R08: 0000000000000001 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004021f0
R13: 0000000000402280 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace c289123c7e157e7b ]---
RIP: 0010:__wake_up_common+0x297/0x4d0 kernel/sched/wait.c:86
Code: fb 01 00 00 45 31 f6 eb 13 66 2e 0f 1f 84 00 00 00 00 00 4d 39 fc 0f 84 e3 01 00 00 4c 89 fb 49 8d 6f e8 4c 89 f8 48 c1 e8 03 <80> 3c 10 00 74 12 48 89 df e8 6b b5 59 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc900043e7c00 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000003 RDI: ffff8880a6860120
RBP: ffffffffffffffe8 R08: 0000000000000000 R09: ffffc900043e7c68
R10: fffff5200087cf80 R11: 0000000000000000 R12: ffff8880a6860160
R13: 1ffff9200087cf8d R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000afd880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 00000000a6821000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (42):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2020/03/31 07:45 upstream 673b41e04a03 c8d1cc20 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/04/16 05:26 upstream 00086336a8d9 3f3c5574 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/16 04:02 upstream 00086336a8d9 3f3c5574 .config log report
ci-upstream-kasan-gce-root 2020/04/15 06:12 upstream 8632e9b5645b 3f3c5574 .config log report
ci-upstream-kasan-gce 2020/04/15 01:30 upstream 8632e9b5645b 3f3c5574 .config log report
ci-upstream-kasan-gce-root 2020/04/14 13:33 upstream 8f3d9f354286 3f3c5574 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/14 06:14 upstream 8f3d9f354286 7c54686a .config log report
ci-upstream-kasan-gce-smack-root 2020/04/14 01:18 upstream 8f3d9f354286 7c54686a .config log report
ci-upstream-kasan-gce-smack-root 2020/04/13 05:32 upstream 4f8a3cc1183c 36b0b050 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/12 17:15 upstream b032227c6293 36b0b050 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/12 08:07 upstream b032227c6293 a8c6a3f8 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/12 07:58 upstream b032227c6293 a8c6a3f8 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/11 23:22 upstream 5b8b9d0c6d0e a8c6a3f8 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/11 12:51 upstream ab6f762f0f53 a8c6a3f8 .config log report
ci-upstream-kasan-gce 2020/04/11 06:10 upstream ab6f762f0f53 a8c6a3f8 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/10 18:31 upstream c0cc271173b2 a8c6a3f8 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/10 02:51 upstream 5d30bcacd91a a8c6a3f8 .config log report
ci-upstream-kasan-gce 2020/04/10 00:46 upstream 5d30bcacd91a a8c6a3f8 .config log report
ci-upstream-kasan-gce-root 2020/04/07 08:47 upstream 7e63420847ae 99a96044 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/07 01:53 upstream 7e63420847ae 99a96044 .config log report
ci-upstream-kasan-gce 2020/04/06 21:22 upstream 7e63420847ae 99a96044 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/03 08:56 upstream 7be97138e727 a34e2c33 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/03 04:54 upstream 7be97138e727 a34e2c33 .config log report
ci-upstream-kasan-gce-smack-root 2020/04/01 22:14 upstream 1a323ea5356e a34e2c33 .config log report
ci-upstream-kasan-gce 2020/04/01 16:39 upstream 1a323ea5356e a34e2c33 .config log report
ci-upstream-kasan-gce-root 2020/04/01 16:10 upstream 1a323ea5356e a34e2c33 .config log report
ci-upstream-kasan-gce 2020/04/01 08:02 upstream 56a451b78067 a34e2c33 .config log report
ci-upstream-kasan-gce-selinux-root 2020/03/31 11:49 upstream 673b41e04a03 c8d1cc20 .config log report
ci-upstream-kasan-gce-smack-root 2020/03/31 07:34 upstream 673b41e04a03 c8d1cc20 .config log report
ci-upstream-kasan-gce-386 2020/04/17 01:10 upstream 9786cab67457 c743fcb3 .config log report
ci-upstream-kasan-gce-386 2020/04/10 04:21 upstream 87ebc45d2d32 a8c6a3f8 .config log report
ci-upstream-kasan-gce-386 2020/04/08 14:57 upstream f5e94d10e4c4 db9bcd4b .config log report
ci-upstream-linux-next-kasan-gce-root 2020/05/07 09:20 linux-next ac935d227366 4618eb2d .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/30 09:16 linux-next ac935d227366 2dd552a5 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/30 05:15 linux-next ac935d227366 2dd552a5 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/25 04:11 linux-next ac935d227366 03d97a1b .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/22 15:00 linux-next ac935d227366 2e44d63e .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/19 09:39 linux-next ac935d227366 365fba24 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/17 07:38 linux-next ac935d227366 18397578 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/10 10:22 linux-next 0434e521ce3b a8c6a3f8 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/10 01:22 linux-next 873e37a44b1e a8c6a3f8 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/10 00:27 linux-next 873e37a44b1e a8c6a3f8 .config log report