[moderation] [kernel?] KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64

3 views
Skip to first unread message

syzbot

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

syzbot found the following issue on:

HEAD commit: 18d46e76d7c2 Merge tag 'for-6.7-rc3-tag' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=114d4a64e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=585869067cd7ce59
dashboard link: https://syzkaller.appspot.com/bug?extid=fb9027810f21adb900b7
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [fred...@kernel.org linux-...@vger.kernel.org mi...@kernel.org tg...@linutronix.de]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4ff85d0f0b28/disk-18d46e76.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/37f6de14cbea/vmlinux-18d46e76.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d94866b08798/bzImage-18d46e76.xz

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

==================================================================
BUG: KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64

read-write to 0xffffffff85a079c0 of 8 bytes by interrupt on cpu 1:
tick_do_update_jiffies64+0x112/0x1b0 kernel/time/tick-sched.c:118
tick_sched_do_timer kernel/time/tick-sched.c:211 [inline]
tick_nohz_highres_handler+0x7b/0x2c0 kernel/time/tick-sched.c:1509
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
__sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
sysvec_apic_timer_interrupt+0x68/0x80 arch/x86/kernel/apic/apic.c:1076
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
__sanitizer_cov_trace_pc+0x0/0x60
folio_referenced_one+0x2b3/0x6b0 mm/rmap.c:862
rmap_walk_file+0x273/0x3b0 mm/rmap.c:2546
rmap_walk mm/rmap.c:2564 [inline]
folio_referenced+0x1b8/0x260 mm/rmap.c:960
folio_check_references mm/vmscan.c:829 [inline]
shrink_folio_list+0x68b/0x2540 mm/vmscan.c:1160
shrink_inactive_list mm/vmscan.c:1913 [inline]
shrink_list mm/vmscan.c:2154 [inline]
shrink_lruvec+0xd80/0x17a0 mm/vmscan.c:5626
shrink_node_memcgs mm/vmscan.c:5812 [inline]
shrink_node+0xab3/0x15c0 mm/vmscan.c:5847
kswapd_shrink_node mm/vmscan.c:6638 [inline]
balance_pgdat mm/vmscan.c:6828 [inline]
kswapd+0xd4c/0x1590 mm/vmscan.c:7088
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

read to 0xffffffff85a079c0 of 8 bytes by task 3070 on cpu 0:
mem_cgroup_flush_stats_ratelimited+0x24/0x100 mm/memcontrol.c:672
workingset_refault+0x54/0x460 mm/workingset.c:523
filemap_add_folio+0xed/0x160 mm/filemap.c:951
page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:250
do_page_cache_ra mm/readahead.c:299 [inline]
page_cache_ra_order+0xd5/0xf0 mm/readahead.c:546
do_sync_mmap_readahead+0x410/0x450 mm/filemap.c:3141
filemap_fault+0x426/0xc30 mm/filemap.c:3233
__do_fault mm/memory.c:4265 [inline]
do_read_fault mm/memory.c:4628 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x13bd/0x2dd0 mm/memory.c:5344
do_user_addr_fault arch/x86/mm/fault.c:1364 [inline]
handle_page_fault arch/x86/mm/fault.c:1505 [inline]
exc_page_fault+0x3ff/0x6c0 arch/x86/mm/fault.c:1561
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

value changed: 0x000000010001c1e1 -> 0x000000010001c1e2

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3070 Comm: syz-fuzzer Not tainted 6.7.0-rc3-syzkaller-00024-g18d46e76d7c2 #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