[moderation] [kernel?] KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64 (4)

0 views
Skip to first unread message

syzbot

unread,
Oct 3, 2024, 3:03:28 PMOct 3
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7ec462100ef9 Merge tag 'pull-work.unaligned' of git://git...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11277580580000
kernel config: https://syzkaller.appspot.com/x/.config?x=95098faba89c70c9
dashboard link: https://syzkaller.appspot.com/bug?extid=cf8afbaee957fcc0f915
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [anna-...@linutronix.de 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/9d1f2ee143e9/disk-7ec46210.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/45db6207b31a/vmlinux-7ec46210.xz
kernel image: https://storage.googleapis.com/syzbot-assets/be2fe8d55fcc/bzImage-7ec46210.xz

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

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

read-write to 0xffffffff866079c0 of 8 bytes by interrupt on cpu 0:
tick_do_update_jiffies64+0x112/0x1b0 kernel/time/tick-sched.c:118
tick_sched_do_timer kernel/time/tick-sched.c:232 [inline]
tick_nohz_handler+0x7c/0x2d0 kernel/time/tick-sched.c:290
__run_hrtimer kernel/time/hrtimer.c:1691 [inline]
__hrtimer_run_queues+0x20d/0x5e0 kernel/time/hrtimer.c:1755
hrtimer_interrupt+0x210/0x7b0 kernel/time/hrtimer.c:1817
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1026 [inline]
__sysvec_apic_timer_interrupt+0x5c/0x1a0 arch/x86/kernel/apic/apic.c:1043
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1037 [inline]
sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1037
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
__preempt_count_dec_and_test arch/x86/include/asm/preempt.h:94 [inline]
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0x3d/0x60 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
__skb_try_recv_datagram+0x120/0x310 net/core/datagram.c:266
__unix_dgram_recvmsg+0x25b/0x860 net/unix/af_unix.c:2435
unix_dgram_recvmsg+0x81/0x90 net/unix/af_unix.c:2537
sock_recvmsg_nosec+0x107/0x140 net/socket.c:1051
____sys_recvmsg+0x271/0x280 net/socket.c:2819
___sys_recvmsg net/socket.c:2863 [inline]
do_recvmmsg+0x2dc/0x740 net/socket.c:2957
__sys_recvmmsg net/socket.c:3036 [inline]
__do_sys_recvmmsg net/socket.c:3059 [inline]
__se_sys_recvmmsg net/socket.c:3052 [inline]
__x64_sys_recvmmsg+0xe2/0x170 net/socket.c:3052
x64_sys_call+0x26e3/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:300
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 0xffffffff866079c0 of 8 bytes by task 85 on cpu 1:
do_flush_stats mm/memcontrol.c:590 [inline]
flush_memcg_stats_dwork+0x26/0x90 mm/memcontrol.c:629
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
kthread+0x1d1/0x210 kernel/kthread.c:389
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x00000000ffffb743 -> 0x00000000ffffb744

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 85 Comm: kworker/u8:4 Not tainted 6.12.0-rc1-syzkaller-00046-g7ec462100ef9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events_unbound flush_memcg_stats_dwork
==================================================================


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

syzbot

unread,
Nov 7, 2024, 2:03:15 PM (10 hours ago) Nov 7
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages