[moderation] [kernel?] KCSAN: data-race in tick_nohz_handler / tick_nohz_next_event

0 views
Skip to first unread message

syzbot

unread,
Apr 5, 2024, 6:11:33 AMApr 5
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c88b9b4cde17 Merge tag 'net-6.9-rc3' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12919103180000
kernel config: https://syzkaller.appspot.com/x/.config?x=d024e89f7bb376ce
dashboard link: https://syzkaller.appspot.com/bug?extid=ed3b6bb9978138dcd1e2
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/e2623340da46/disk-c88b9b4c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/089c05c92424/vmlinux-c88b9b4c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ebcd981ceaf6/bzImage-c88b9b4c.xz

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

==================================================================
BUG: KCSAN: data-race in tick_nohz_handler / tick_nohz_next_event

write to 0xffffffff8652ebb0 of 4 bytes by interrupt on cpu 0:
tick_sched_do_timer kernel/time/tick-sched.c:224 [inline]
tick_nohz_handler+0x2bc/0x2d0 kernel/time/tick-sched.c:287
__run_hrtimer kernel/time/hrtimer.c:1692 [inline]
__hrtimer_run_queues+0x214/0x5e0 kernel/time/hrtimer.c:1756
hrtimer_interrupt+0x210/0x7b0 kernel/time/hrtimer.c:1818
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x5c/0x1a0 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
__tsan_read4+0x12/0x180 kernel/kcsan/core.c:1024
zone_to_nid include/linux/mmzone.h:1507 [inline]
zonelist_node_idx include/linux/mmzone.h:1615 [inline]
zref_in_nodemask mm/mmzone.c:49 [inline]
__next_zones_zonelist+0x4f/0x90 mm/mmzone.c:69
next_zones_zonelist include/linux/mmzone.h:1643 [inline]
first_zones_zonelist include/linux/mmzone.h:1667 [inline]
prepare_alloc_pages mm/page_alloc.c:4361 [inline]
__alloc_pages+0x24c/0x360 mm/page_alloc.c:4564
alloc_pages_mpol+0xb1/0x1e0 mm/mempolicy.c:2264
alloc_pages+0xe1/0x100 mm/mempolicy.c:2335
pipe_write+0x34e/0xd30 fs/pipe.c:513
call_write_iter include/linux/fs.h:2108 [inline]
new_sync_write fs/read_write.c:497 [inline]
vfs_write+0x771/0x8e0 fs/read_write.c:590
ksys_write+0xeb/0x1b0 fs/read_write.c:643
__do_sys_write fs/read_write.c:655 [inline]
__se_sys_write fs/read_write.c:652 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:652
do_syscall_64+0xd3/0x1d0
entry_SYSCALL_64_after_hwframe+0x72/0x7a

read to 0xffffffff8652ebb0 of 4 bytes by task 0 on cpu 1:
tick_nohz_next_event+0x1ee/0x2d0 kernel/time/tick-sched.c:949
tick_nohz_get_sleep_length+0xac/0x110 kernel/time/tick-sched.c:1343
menu_select+0x822/0x1070 drivers/cpuidle/governors/menu.c:286
cpuidle_select+0x45/0x60 drivers/cpuidle/cpuidle.c:359
cpuidle_idle_call kernel/sched/idle.c:229 [inline]
do_idle+0x161/0x230 kernel/sched/idle.c:332
cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:430
start_secondary+0x94/0xa0 arch/x86/kernel/smpboot.c:313
common_startup_64+0x12c/0x137

value changed: 0xffffffff -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G W 6.9.0-rc2-syzkaller-00193-gc88b9b4cde17 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================


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