syzbot


WARNING: suspicious RCU usage in mas_walk

Status: upstream: reported C repro on 2022/04/29 05:41
Reported-by: syzbot+2ee18845e89ae76342c5@syzkaller.appspotmail.com
First crash: 152d, last: 54d

Cause bisection: failed (bisect log)

Sample crash report:
=============================
WARNING: suspicious RCU usage
5.19.0-rc4-next-20220628-syzkaller #0 Not tainted
-----------------------------
lib/maple_tree.c:844 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
5 locks held by syz-executor321/3708:
 #0: ffff88807eeba460 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0x127/0x250 fs/read_write.c:644
 #1: ffff88807c02dc88 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x28c/0x610 fs/kernfs/file.c:281
 #2: ffff888145276e88 (kn->active#106){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2b0/0x610 fs/kernfs/file.c:282
 #3: ffffffff8bee2de8 (ksm_thread_mutex){+.+.}-{3:3}, at: run_store+0xd1/0xae0 mm/ksm.c:2923
 #4: ffff888077d1d858 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #4: ffff888077d1d858 (&mm->mmap_lock#2){++++}-{3:3}, at: unmerge_and_remove_all_rmap_items mm/ksm.c:989 [inline]
 #4: ffff888077d1d858 (&mm->mmap_lock#2){++++}-{3:3}, at: run_store+0x2a0/0xae0 mm/ksm.c:2929

stack backtrace:
CPU: 1 PID: 3708 Comm: syz-executor321 Not tainted 5.19.0-rc4-next-20220628-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 mas_root lib/maple_tree.c:844 [inline]
 mas_start lib/maple_tree.c:1331 [inline]
 mas_state_walk lib/maple_tree.c:3812 [inline]
 mas_walk+0x45e/0x670 lib/maple_tree.c:4997
 mas_find+0x346/0xce0 lib/maple_tree.c:5942
 vma_find include/linux/mm.h:664 [inline]
 vma_next include/linux/mm.h:673 [inline]
 unmerge_and_remove_all_rmap_items mm/ksm.c:990 [inline]
 run_store+0x2e3/0xae0 mm/ksm.c:2929
 kobj_attr_store+0x50/0x80 lib/kobject.c:824
 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x3f8/0x610 fs/kernfs/file.c:290
 call_write_iter include/linux/fs.h:2188 [inline]
 new_sync_write+0x315/0x4d0 fs/read_write.c:504
 vfs_write+0x7c0/0xac0 fs/read_write.c:591
 ksys_write+0x127/0x250 fs/read_write.c:644
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f5ee7610e49
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffad53be78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f5ee7610e49
RDX: 0000000000000002 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 000000000000cd1a
R13: 00007fffad53be8c R14: 00007fffad53bea0 R15: 00007fffad53be90
 </TASK>

Crashes (10):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2022/08/03 21:00 linux-next cb71b93c2dc3 1c9013ac .config log report syz C WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/04/28 19:04 linux-next bdc61aad77fa e9076525 .config log report syz C WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/08/05 08:27 linux-next cb71b93c2dc3 1c9013ac .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/06/29 19:15 linux-next cb71b93c2dc3 1434eec0 .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/06/20 03:34 linux-next 07dc787be231 8f633d84 .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/05/15 15:00 linux-next 1e1b28b936ae 744a39e2 .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/05/13 13:49 linux-next 1e1b28b936ae 107f6434 .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/05/13 11:54 linux-next 1e1b28b936ae 107f6434 .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/05/13 09:48 linux-next 1e1b28b936ae 9ad6612a .config log report info WARNING: suspicious RCU usage in mas_walk
ci-upstream-linux-next-kasan-gce-root 2022/04/28 16:17 linux-next bdc61aad77fa e9076525 .config log report info WARNING: suspicious RCU usage in mas_walk
* Struck through repros no longer work on HEAD.