syzbot


WARNING: suspicious RCU usage in mas_walk (3)

Status: upstream: reported C repro on 2023/10/10 18:40
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+79fcba037b6df73756d3@syzkaller.appspotmail.com
Fix commit: mempolicy: migration attempt to match interleave nodes: fix
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-net-next-test-gce ci2-upstream-usb]
First crash: 234d, last: 216d
Cause bisection: introduced by (bisect log) :
commit edd33b8807a1fa6268a71758bf38de0b4adf2e70
Author: Hugh Dickins <hughd@google.com>
Date: Tue Oct 3 09:29:00 2023 +0000

  mempolicy: migration attempt to match interleave nodes

Crash: WARNING: suspicious RCU usage in mas_walk (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [mm?] WARNING: suspicious RCU usage in mas_walk (3) 2 (6) 2023/10/25 00:07
[PATCH] mempolicy: migration attempt to match interleave nodes: fix 2 (2) 2023/10/24 15:18
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: suspicious RCU usage in mas_walk kernfs C error 234 430d 759d 22/26 fixed on 2023/06/08 14:41
upstream WARNING: suspicious RCU usage in mas_walk (2) mm C done 97 305d 326d 0/26 auto-obsoleted due to no activity on 2023/10/05 22:43

Sample crash report:
=============================
WARNING: suspicious RCU usage
6.6.0-rc6-next-20231023-syzkaller #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
no locks held by syz-executor445/16542.

stack backtrace:
CPU: 1 PID: 16542 Comm: syz-executor445 Not tainted 6.6.0-rc6-next-20231023-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
 lockdep_rcu_suspicious+0x20b/0x3a0 kernel/locking/lockdep.c:6711
 mas_root lib/maple_tree.c:856 [inline]
 mas_root lib/maple_tree.c:854 [inline]
 mas_start lib/maple_tree.c:1385 [inline]
 mas_state_walk lib/maple_tree.c:3705 [inline]
 mas_walk+0x4d1/0x7d0 lib/maple_tree.c:4888
 mas_find_setup lib/maple_tree.c:5948 [inline]
 mas_find+0x1e6/0x400 lib/maple_tree.c:5989
 vma_find include/linux/mm.h:952 [inline]
 do_mbind+0xc8f/0x1010 mm/mempolicy.c:1328
 kernel_mbind+0x1d4/0x1f0 mm/mempolicy.c:1486
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x62/0x6a
RIP: 0033:0x7f384f7bd229
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 1d 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f384f753158 EFLAGS: 00000212 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f384f8413f8 RCX: 00007f384f7bd229
RDX: 0000000000000003 RSI: 0000000000005000 RDI: 0000000020182000
RBP: 00007f384f8413f0 R08: 000000000000007f R09: 0000000000000003
R10: 0000000020000040 R11: 0000000000000212 R12: 00007f384f8413fc
R13: 000000000000006e R14: 00007ffdafb5ca20 R15: 00007ffdafb5cb08
 </TASK>

=============================
WARNING: suspicious RCU usage
6.6.0-rc6-next-20231023-syzkaller #0 Not tainted
-----------------------------
lib/maple_tree.c:812 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
no locks held by syz-executor445/16542.

stack backtrace:
CPU: 0 PID: 16542 Comm: syz-executor445 Not tainted 6.6.0-rc6-next-20231023-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
 lockdep_rcu_suspicious+0x20b/0x3a0 kernel/locking/lockdep.c:6711
 mt_slot lib/maple_tree.c:812 [inline]
 mt_slot lib/maple_tree.c:809 [inline]
 mtree_range_walk+0x6c5/0x9b0 lib/maple_tree.c:2827
 mas_state_walk lib/maple_tree.c:3712 [inline]
 mas_walk+0x374/0x7d0 lib/maple_tree.c:4888
 mas_find_setup lib/maple_tree.c:5948 [inline]
 mas_find+0x1e6/0x400 lib/maple_tree.c:5989
 vma_find include/linux/mm.h:952 [inline]
 do_mbind+0xc8f/0x1010 mm/mempolicy.c:1328
 kernel_mbind+0x1d4/0x1f0 mm/mempolicy.c:1486
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x62/0x6a
RIP: 0033:0x7f384f7bd229
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 1d 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f384f753158 EFLAGS: 00000212 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f384f8413f8 RCX: 00007f384f7bd229
RDX: 0000000000000003 RSI: 0000000000005000 RDI: 0000000020182000
RBP: 00007f384f8413f0 R08: 000000000000007f R09: 0000000000000003
R10: 0000000020000040 R11: 0000000000000212 R12: 00007f384f8413fc
R13: 000000000000006e R14: 00007ffdafb5ca20 R15: 00007ffdafb5cb08
 </TASK>

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/24 09:31 linux-next e8361b005d7c af8d2e46 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/10/23 17:42 linux-next e8361b005d7c 989a3687 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/10/23 17:24 linux-next e8361b005d7c 989a3687 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
2023/10/24 21:35 linux-next f017d9a92a73 17e6d526 .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/10/24 16:36 linux-next f017d9a92a73 af8d2e46 .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/10/24 05:40 linux-next e8361b005d7c af8d2e46 .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/10/24 03:02 linux-next e8361b005d7c af8d2e46 .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/10/23 14:41 linux-next e8361b005d7c 989a3687 .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/10/23 12:55 linux-next e8361b005d7c 989a3687 .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/10/23 10:08 linux-next e8361b005d7c 361b23dc .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/10/23 07:42 linux-next e8361b005d7c 361b23dc .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/10/06 18:35 linux-next 7d730f1bf6f3 ea12a918 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in mas_walk
* Struck through repros no longer work on HEAD.