syzbot


KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue (2)

Status: auto-obsoleted due to no activity on 2024/09/27 23:15
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+9bb7d0f2fdb4229b9d67@syzkaller.appspotmail.com
First crash: 188d, last: 125d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue (2) 3 (4) 2024/06/24 09:38
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue mm 3 287d 320d 0/28 auto-obsoleted due to no activity on 2024/04/19 00:03
upstream KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue (3) mm 1 6d23h 6d23h 0/28 moderation: reported on 2024/12/20 03:22

Sample crash report:
==================================================================
BUG: KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue

write to 0xffff888102bf2e08 of 8 bytes by task 11735 on cpu 1:
 rcu_segcblist_enqueue+0x67/0xb0 kernel/rcu/rcu_segcblist.c:345
 rcutree_enqueue kernel/rcu/tree.c:2974 [inline]
 call_rcu_core kernel/rcu/tree.c:2991 [inline]
 __call_rcu_common kernel/rcu/tree.c:3127 [inline]
 call_rcu+0x1bd/0x430 kernel/rcu/tree.c:3210
 ma_free_rcu lib/maple_tree.c:197 [inline]
 mas_free lib/maple_tree.c:1304 [inline]
 mas_replace_node+0x2f8/0x440 lib/maple_tree.c:1741
 mas_wr_node_store lib/maple_tree.c:3956 [inline]
 mas_wr_modify+0x2bc3/0x3c90 lib/maple_tree.c:4189
 mas_wr_store_entry+0x250/0x390 lib/maple_tree.c:4227
 mas_store_prealloc+0x151/0x2b0 lib/maple_tree.c:5482
 vma_iter_store mm/internal.h:1452 [inline]
 vma_complete+0x3a7/0x760 mm/mmap.c:576
 __split_vma+0x623/0x690 mm/mmap.c:2511
 split_vma mm/mmap.c:2537 [inline]
 vma_modify+0x198/0x1f0 mm/mmap.c:2578
 vma_modify_flags include/linux/mm.h:3309 [inline]
 mprotect_fixup+0x335/0x610 mm/mprotect.c:639
 do_mprotect_pkey+0x673/0x9a0 mm/mprotect.c:822
 __do_sys_mprotect mm/mprotect.c:843 [inline]
 __se_sys_mprotect mm/mprotect.c:840 [inline]
 __x64_sys_mprotect+0x48/0x60 mm/mprotect.c:840
 x64_sys_call+0x26cf/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:11
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888102bf2e08 of 8 bytes by task 11741 on cpu 0:
 mtree_range_walk+0x140/0x460 lib/maple_tree.c:2774
 mas_state_walk lib/maple_tree.c:3678 [inline]
 mas_walk+0x16e/0x320 lib/maple_tree.c:4906
 lock_vma_under_rcu+0x84/0x260 mm/memory.c:5994
 do_user_addr_fault arch/x86/mm/fault.c:1329 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x150/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 11741 Comm: syz.2.1785 Not tainted 6.11.0-rc4-syzkaller-00143-g3d5f968a177d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/23 23:14 upstream 3d5f968a177d d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue
2024/08/01 12:17 upstream 21b136cc63d2 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue
2024/07/15 07:58 upstream 0c3836482481 c605e6a2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue
2024/06/21 11:49 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mtree_range_walk / rcu_segcblist_enqueue
* Struck through repros no longer work on HEAD.