syzbot


WARNING: suspicious RCU usage in mas_walk

Status: fixed on 2023/06/08 14:41
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+2ee18845e89ae76342c5@syzkaller.appspotmail.com
Fix commit: 6db504ce55bd mm/ksm: fix race with VMA iteration and mm_struct teardown
First crash: 722d, last: 392d
Cause bisection: failed (error log, bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] mm/ksm: Fix race with VMA iteration and mm_struct teardown 1 (1) 2023/03/08 22:03
[PATCH] mm/ksm: Fix race with ksm_exit() in VMA iteration 5 (5) 2023/03/08 17:26
[syzbot] WARNING: suspicious RCU usage in mas_walk 3 (4) 2022/05/02 12:57
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: suspicious RCU usage in mas_walk (3) mm C done 12 178d 192d 1/26 upstream: reported C repro on 2023/10/10 18:40
upstream WARNING: suspicious RCU usage in mas_walk (2) mm C done 97 267d 289d 0/26 auto-obsoleted due to no activity on 2023/10/05 22:43

Sample crash report:
=============================
WARNING: suspicious RCU usage
6.2.0-syzkaller-12485-gf3a2439f20d9 #0 Not tainted
-----------------------------
lib/maple_tree.c:856 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-executor379/5138:
 #0: ffff88802c37c460 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0x12b/0x250 fs/read_write.c:637
 #1: ffff8880202f6888 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x285/0x600 fs/kernfs/file.c:325
 #2: ffff8880178b4490 (kn->active#47){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2a9/0x600 fs/kernfs/file.c:326
 #3: ffffffff8c90bce8 (ksm_thread_mutex){+.+.}-{3:3}, at: run_store+0xd5/0xa30 mm/ksm.c:2953
 #4: ffff888076a84258 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #4: ffff888076a84258 (&mm->mmap_lock){++++}-{3:3}, at: unmerge_and_remove_all_rmap_items mm/ksm.c:990 [inline]
 #4: ffff888076a84258 (&mm->mmap_lock){++++}-{3:3}, at: run_store+0x2a9/0xa30 mm/ksm.c:2959

stack backtrace:
CPU: 0 PID: 5138 Comm: syz-executor379 Not tainted 6.2.0-syzkaller-12485-gf3a2439f20d9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
 lockdep_rcu_suspicious+0x208/0x3a0 kernel/locking/lockdep.c:6599
 mas_root lib/maple_tree.c:856 [inline]
 mas_start lib/maple_tree.c:1357 [inline]
 mas_state_walk lib/maple_tree.c:3838 [inline]
 mas_walk+0x473/0x6e0 lib/maple_tree.c:5052
 mas_find+0x150/0x200 lib/maple_tree.c:6030
 vma_next include/linux/mm.h:745 [inline]
 unmerge_and_remove_all_rmap_items mm/ksm.c:991 [inline]
 run_store+0x2e7/0xa30 mm/ksm.c:2959
 kobj_attr_store+0x54/0x80 lib/kobject.c:832
 sysfs_kf_write+0x114/0x170 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x3f1/0x600 fs/kernfs/file.c:334
 call_write_iter include/linux/fs.h:1851 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x9ed/0xe10 fs/read_write.c:584
 ksys_write+0x12b/0x250 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f9fbf756e49
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:00007fff4fa8ea58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f9fbf756e49
RDX: 0000000000000002 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 000000000000e6c1
R13: 00007fff4fa8ea6c R14: 00007fff4fa8ea80 R15: 00007fff4fa8ea70
 </TASK>

Crashes (234):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/27 15:45 upstream f3a2439f20d9 e792ae78 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING: suspicious RCU usage in mas_walk
2023/02/09 08:56 upstream 0983f6bf2bfc 14a312c8 .config strace log report syz C ci-upstream-kasan-gce WARNING: suspicious RCU usage in mas_walk
2023/02/08 17:59 upstream 0983f6bf2bfc fc9c934e .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING: suspicious RCU usage in mas_walk
2022/08/03 21:00 linux-next cb71b93c2dc3 1c9013ac .config strace log report syz C ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2022/04/28 19:04 linux-next bdc61aad77fa e9076525 .config console log report syz C ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/24 17:38 upstream 1e760fa3596e 9700afae .config console log report info ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/24 09:04 upstream 1e760fa3596e f94b4a29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/23 22:42 upstream 9fd6ba5420ba f94b4a29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/23 03:00 upstream fff5a5e7f528 f94b4a29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/22 13:59 upstream a1effab7a3a3 d846e076 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/21 22:56 upstream 2faac9a98f01 8b4eb097 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/20 17:13 upstream e8d018dd0257 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/20 10:21 upstream e8d018dd0257 7939252e .config console log report info ci-qemu-upstream WARNING: suspicious RCU usage in mas_walk
2023/03/19 19:48 upstream 5cdfdd6da323 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/18 12:23 upstream 478a351ce0d6 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/18 01:29 upstream 8d3c682a5e3d 7939252e .config console log report info ci-upstream-kasan-gce WARNING: suspicious RCU usage in mas_walk
2023/03/16 23:02 upstream 0ddc84d2dd43 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/16 20:07 upstream 0ddc84d2dd43 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/15 18:23 upstream 6015b1aca1a2 18b58603 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: suspicious RCU usage in mas_walk
2023/03/15 15:13 upstream 6015b1aca1a2 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/15 01:00 upstream 4979bf866825 0d5c4377 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/14 21:50 upstream 4979bf866825 0d5c4377 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/13 21:17 upstream fc89d7fb499b 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/12 21:54 upstream 134231664868 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/12 19:58 upstream 134231664868 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/06 07:42 upstream f915322fe014 f8902b57 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: suspicious RCU usage in mas_walk
2023/03/04 17:59 upstream 0988a0ea7919 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/04 04:02 upstream 0a3f9a6b0265 f8902b57 .config console log report info ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/03 22:59 upstream 0a3f9a6b0265 f8902b57 .config console log report info ci-upstream-kasan-gce WARNING: suspicious RCU usage in mas_walk
2023/03/03 01:44 upstream 04a357b1f6f0 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/02/07 11:31 upstream 05ecb680708a 7d00f0e1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: suspicious RCU usage in mas_walk
2023/03/23 20:55 upstream 9fd6ba5420ba f94b4a29 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/21 01:43 upstream 7d31677bb7b1 7939252e .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/20 23:39 upstream 7d31677bb7b1 7939252e .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/20 08:30 upstream e8d018dd0257 7939252e .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/19 21:33 upstream 5cdfdd6da323 7939252e .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/19 02:27 upstream a3671bd86a97 7939252e .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/16 04:39 upstream 9c1bec9c0b08 18b58603 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/16 03:23 upstream 9c1bec9c0b08 18b58603 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/16 02:20 upstream 9c1bec9c0b08 18b58603 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/15 13:03 upstream 6015b1aca1a2 18b58603 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/14 14:05 upstream fc89d7fb499b 0d5c4377 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/14 11:22 upstream fc89d7fb499b 0d5c4377 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/14 02:27 upstream fc89d7fb499b 026e2200 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/13 15:41 upstream eeac8ede1755 026e2200 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/13 10:46 upstream eeac8ede1755 5205ef30 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/13 08:34 upstream eeac8ede1755 5205ef30 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/12 23:25 upstream 134231664868 5205ef30 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/06 00:13 upstream f915322fe014 f8902b57 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/05 04:31 upstream b01fe98d34f3 f8902b57 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/03 11:38 upstream 2eb29d59ddf0 f8902b57 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/02 00:36 upstream ee3f96b16468 f8902b57 .config console log report info ci-upstream-kasan-gce-386 WARNING: suspicious RCU usage in mas_walk
2023/03/06 18:59 linux-next dc837c1a5137 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/06 12:45 linux-next dc837c1a5137 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/03/01 08:11 linux-next 1716a175592a 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2022/04/28 16:17 linux-next bdc61aad77fa e9076525 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/02/06 17:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ca72d58361ee 0a9c11b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: suspicious RCU usage in mas_walk
* Struck through repros no longer work on HEAD.