syzbot


KCSAN: data-race in clockevents_program_event / print_tickdevice (8)

Status: auto-obsoleted due to no activity on 2024/01/23 08:37
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+b495a6fc2cd1b32de208@syzkaller.appspotmail.com
First crash: 134d, last: 134d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (6) kernel 28 320d 612d 0/26 auto-obsoleted due to no activity on 2023/07/21 02:50
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (7) kernel 2 188d 188d 0/26 auto-obsoleted due to no activity on 2023/11/30 21:56
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (5) kernel 7 660d 686d 0/26 auto-closed as invalid on 2022/08/15 19:00
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (2) kernel 1 1021d 1021d 0/26 auto-closed as invalid on 2021/08/19 20:40
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (9) kernel 1 23d 23d 0/26 moderation: reported on 2024/04/08 19:49
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (4) kernel 1 809d 809d 0/26 auto-closed as invalid on 2022/03/19 14:36
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice kernel 1 1104d 1101d 0/26 auto-closed as invalid on 2021/05/28 09:07
upstream KCSAN: data-race in clockevents_program_event / print_tickdevice (3) kernel 5 910d 941d 0/26 auto-closed as invalid on 2021/12/08 10:38

Sample crash report:
==================================================================
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
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/19 08:36 upstream 2cf4f94d8e86 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in clockevents_program_event / print_tickdevice
* Struck through repros no longer work on HEAD.