[moderation] [cgroups?] [mm?] KCSAN: data-race in __refill_stock / drain_all_stock (2)

3 views
Skip to first unread message

syzbot

unread,
Dec 8, 2023, 7:00:27 PM12/8/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9ace34a8e446 Merge tag 'cgroup-for-6.7-rc4-fixes' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=116a3c12e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=998e0d747e79167d9592
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org cgr...@vger.kernel.org han...@cmpxchg.org linux-...@vger.kernel.org linu...@kvack.org mho...@kernel.org muchu...@linux.dev roman.g...@linux.dev shak...@google.com]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/955528ed37c5/disk-9ace34a8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ed03c0892611/vmlinux-9ace34a8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b4d56563956a/bzImage-9ace34a8.xz

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

==================================================================
BUG: KCSAN: data-race in __refill_stock / drain_all_stock

read-write to 0xffff888237d2a3c0 of 4 bytes by task 11785 on cpu 1:
__refill_stock+0x7f/0xb0 mm/memcontrol.c:2364
refill_stock mm/memcontrol.c:2375 [inline]
obj_cgroup_uncharge_pages+0xfb/0x1a0 mm/memcontrol.c:3234
__memcg_kmem_uncharge_page+0x53/0x100 mm/memcontrol.c:3307
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_unref_page_prepare+0x7c/0x2a0 mm/page_alloc.c:2347
free_unref_page+0x34/0x170 mm/page_alloc.c:2487
bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:143 [inline]
bpf_ringbuf_alloc+0x2b0/0x2f0 kernel/bpf/ringbuf.c:170
ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204
map_create+0x713/0xa40 kernel/bpf/syscall.c:1210
__sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5365
__do_sys_bpf kernel/bpf/syscall.c:5487 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5485 [inline]
__x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5485
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888237d2a3c0 of 4 bytes by task 11800 on cpu 0:
drain_all_stock+0xd3/0x2d0 mm/memcontrol.c:2405
try_charge_memcg+0x6c5/0xd30 mm/memcontrol.c:2750
obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3255
__memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3281
__alloc_pages+0x1bb/0x340 mm/page_alloc.c:4585
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline]
bpf_ringbuf_alloc+0xba/0x2f0 kernel/bpf/ringbuf.c:170
ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204
map_create+0x713/0xa40 kernel/bpf/syscall.c:1210
__sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5365
__do_sys_bpf kernel/bpf/syscall.c:5487 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5485 [inline]
__x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5485
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000e -> 0x00000009

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11800 Comm: syz-executor.0 Not tainted 6.7.0-rc4-syzkaller-00039-g9ace34a8e446 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


---
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