[moderation] [cgroups?] KCSAN: data-race in __mod_memcg_lruvec_state / rebind_subsystems

0 views
Skip to first unread message

syzbot

unread,
May 23, 2024, 1:59:21 AMMay 23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2a8120d7b482 Merge tag 's390-6.10-2' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1320b758980000
kernel config: https://syzkaller.appspot.com/x/.config?x=f35bb3f898275bfc
dashboard link: https://syzkaller.appspot.com/bug?extid=50b9e23cf39a956e10ba
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [cgr...@vger.kernel.org han...@cmpxchg.org linux-...@vger.kernel.org lize...@bytedance.com t...@kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c7fb0632f985/disk-2a8120d7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/78cc88e198bf/vmlinux-2a8120d7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/79a49ed243be/bzImage-2a8120d7.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+50b9e2...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __mod_memcg_lruvec_state / rebind_subsystems

write to 0xffff888100149000 of 8 bytes by task 3086 on cpu 0:
rebind_subsystems+0x44d/0x9b0 kernel/cgroup/cgroup.c:1842
cgroup_setup_root+0x1ea/0x560 kernel/cgroup/cgroup.c:2117
cgroup1_root_to_use kernel/cgroup/cgroup-v1.c:1224 [inline]
cgroup1_get_tree+0x54e/0x840 kernel/cgroup/cgroup-v1.c:1244
vfs_get_tree+0x56/0x1d0 fs/super.c:1780
do_new_mount+0x227/0x690 fs/namespace.c:3352
path_mount+0x49b/0xb30 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x27f/0x2d0 fs/namespace.c:3875
__x64_sys_mount+0x67/0x80 fs/namespace.c:3875
x64_sys_call+0x2591/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:166
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888100149000 of 8 bytes by task 3098 on cpu 1:
memcg_rstat_updated mm/memcontrol.c:855 [inline]
__mod_memcg_lruvec_state+0xe4/0x220 mm/memcontrol.c:1029
__mod_lruvec_state+0x3c/0x50 mm/memcontrol.c:1051
__update_lru_size include/linux/mm_inline.h:47 [inline]
update_lru_size include/linux/mm_inline.h:56 [inline]
lruvec_del_folio include/linux/mm_inline.h:356 [inline]
__page_cache_release+0x2fa/0x4a0 mm/swap.c:82
folios_put_refs+0x15e/0x2b0 mm/swap.c:1009
free_pages_and_swap_cache+0x289/0x400 mm/swap_state.c:329
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:366 [inline]
tlb_flush_mmu+0x2cf/0x440 mm/mmu_gather.c:373
tlb_finish_mmu+0x8c/0x100 mm/mmu_gather.c:465
exit_mmap+0x2b7/0x710 mm/mmap.c:3325
__mmput+0x28/0x1c0 kernel/fork.c:1346
mmput+0x4c/0x60 kernel/fork.c:1368
exit_mm+0xe4/0x190 kernel/exit.c:568
do_exit+0x57e/0x1740 kernel/exit.c:864
do_group_exit+0x142/0x150 kernel/exit.c:1026
__do_sys_exit_group kernel/exit.c:1037 [inline]
__se_sys_exit_group kernel/exit.c:1035 [inline]
__x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1035
x64_sys_call+0x27c1/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffffffff8614d5c0 -> 0xffff88810b6de040

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3098 Comm: dhcpcd Not tainted 6.9.0-syzkaller-10713-g2a8120d7b482 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================
dhcpcd (3098) used greatest stack depth: 11336 bytes left


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages