[moderation] [kernel?] KCSAN: data-race in clockevents_program_event / print_tickdevice (8)

2 views
Skip to first unread message

syzbot

unread,
Dec 19, 2023, 3:37:22 AM12/19/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2cf4f94d8e86 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1670261ae80000
kernel config: https://syzkaller.appspot.com/x/.config?x=989a728d0f884055
dashboard link: https://syzkaller.appspot.com/bug?extid=b495a6fc2cd1b32de208
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [linux-...@vger.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/eab343f2d1a0/disk-2cf4f94d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3222d147aacc/vmlinux-2cf4f94d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/81f4502c659f/bzImage-2cf4f94d.xz

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

==================================================================
BUG: KCSAN: data-race in clockevents_program_event / print_tickdevice

write to 0xffff888237d1bf18 of 8 bytes by interrupt on cpu 1:
clockevents_program_event+0x34/0x1d0 kernel/time/clockevents.c:313
tick_program_event+0x7c/0xc0 kernel/time/tick-oneshot.c:44
hrtimer_interrupt+0x251/0x7b0 kernel/time/hrtimer.c:1827
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:649
is_atomic kernel/kcsan/core.c:249 [inline]
should_watch kernel/kcsan/core.c:277 [inline]
check_access kernel/kcsan/core.c:752 [inline]
__tsan_read8+0xe4/0x180 kernel/kcsan/core.c:1025
native_save_fl arch/x86/include/asm/irqflags.h:32 [inline]
arch_local_save_flags arch/x86/include/asm/irqflags.h:67 [inline]
arch_local_irq_save arch/x86/include/asm/irqflags.h:103 [inline]
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
_raw_spin_lock_irqsave+0x3c/0xa0 kernel/locking/spinlock.c:162
__percpu_counter_sum+0x22/0x130 lib/percpu_counter.c:143
percpu_counter_sum_positive include/linux/percpu_counter.h:99 [inline]
ext4_has_free_clusters+0x179/0x330 fs/ext4/balloc.c:641
ext4_claim_free_clusters+0x24/0x80 fs/ext4/balloc.c:671
ext4_mb_new_blocks+0x298/0x21e0 fs/ext4/mballoc.c:6140
ext4_ext_map_blocks+0x1086/0x3640 fs/ext4/extents.c:4285
ext4_map_blocks+0x704/0xf60 fs/ext4/inode.c:621
ext4_alloc_file_blocks+0x285/0x6f0 fs/ext4/extents.c:4462
ext4_fallocate+0x77e/0x1190 fs/ext4/extents.c:4757
vfs_fallocate+0x378/0x3e0 fs/open.c:324
do_vfs_ioctl+0x12e6/0x13a0 fs/ioctl.c:850
__do_sys_ioctl fs/ioctl.c:869 [inline]
__se_sys_ioctl+0x81/0x140 fs/ioctl.c:857
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
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 0xffff888237d1bf18 of 8 bytes by task 18057 on cpu 0:
print_tickdevice+0x144/0x340 kernel/time/timer_list.c:204
timer_list_show+0x79/0x180 kernel/time/timer_list.c:296
seq_read_iter+0x612/0x8f0 fs/seq_file.c:272
proc_reg_read_iter+0x114/0x180 fs/proc/inode.c:302
call_read_iter include/linux/fs.h:2014 [inline]
copy_splice_read+0x26b/0x4b0 fs/splice.c:364
vfs_splice_read fs/splice.c:993 [inline]
splice_direct_to_actor+0x28c/0x690 fs/splice.c:1069
do_splice_direct+0x10d/0x190 fs/splice.c:1194
do_sendfile+0x3c4/0x980 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1322 [inline]
__se_sys_sendfile64 fs/read_write.c:1308 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
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: 0x7fffffffffffffff -> 0x0000006fcc7f1c06

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 18057 Comm: syz-executor.5 Not tainted 6.7.0-rc6-syzkaller-00010-g2cf4f94d8e86 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/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

syzbot

unread,
Jan 23, 2024, 3:37:11 AMJan 23
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