================================================================== BUG: KCSAN: data-race in wq_worker_tick / wq_worker_tick read-write to 0xffff8881000670a8 of 8 bytes by interrupt on cpu 0: wq_worker_tick+0x66/0x3c0 kernel/workqueue.c:1339 scheduler_tick+0x13e/0x1d0 kernel/sched/core.c:5690 update_process_times+0xf5/0x110 kernel/time/timer.c:2092 tick_sched_handle kernel/time/tick-sched.c:255 [inline] tick_nohz_highres_handler+0x244/0x2c0 kernel/time/tick-sched.c:1519 __run_hrtimer kernel/time/hrtimer.c:1689 [inline] __hrtimer_run_queues+0x210/0x5d0 kernel/time/hrtimer.c:1753 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1815 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+0x6a/0x80 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 get_current arch/x86/include/asm/current.h:42 [inline] get_ctx kernel/kcsan/core.c:206 [inline] check_access kernel/kcsan/core.c:750 [inline] __tsan_read4+0xdb/0x180 kernel/kcsan/core.c:1024 lookahead_bufs drivers/tty/tty_buffer.c:398 [inline] flush_to_ldisc+0x22c/0x400 drivers/tty/tty_buffer.c:497 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706 worker_thread+0x525/0x730 kernel/workqueue.c:2787 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:243 read-write to 0xffff8881000670a8 of 8 bytes by interrupt on cpu 1: wq_worker_tick+0x66/0x3c0 kernel/workqueue.c:1339 scheduler_tick+0x13e/0x1d0 kernel/sched/core.c:5690 update_process_times+0xf5/0x110 kernel/time/timer.c:2092 tick_sched_handle kernel/time/tick-sched.c:255 [inline] tick_nohz_highres_handler+0x244/0x2c0 kernel/time/tick-sched.c:1519 __run_hrtimer kernel/time/hrtimer.c:1689 [inline] __hrtimer_run_queues+0x210/0x5d0 kernel/time/hrtimer.c:1753 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1815 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+0x6a/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_unaligned_write8+0x129/0x180 kernel/kcsan/core.c:1025 native_save_fl arch/x86/include/asm/irqflags.h:19 [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+0x28/0xa0 kernel/locking/spinlock.c:162 tty_insert_flip_string_and_push_buffer+0x33/0x200 drivers/tty/tty_buffer.c:557 pty_write+0x7e/0xa0 drivers/tty/pty.c:118 tty_put_char+0x83/0xb0 drivers/tty/tty_io.c:3168 n_tty_process_echo_ops drivers/tty/n_tty.c:664 [inline] __process_echoes+0x3a3/0x6a0 drivers/tty/n_tty.c:709 flush_echoes drivers/tty/n_tty.c:807 [inline] __receive_buf drivers/tty/n_tty.c:1632 [inline] n_tty_receive_buf_common+0x8e6/0xbc0 drivers/tty/n_tty.c:1729 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1775 tty_ldisc_receive_buf+0x60/0xe0 drivers/tty/tty_buffer.c:386 tty_port_default_receive_buf+0x59/0x90 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:444 [inline] flush_to_ldisc+0x1ca/0x400 drivers/tty/tty_buffer.c:494 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706 worker_thread+0x525/0x730 kernel/workqueue.c:2787 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:243 value changed: 0x0000000004a1e9c0 -> 0x0000000004a210d0 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2800 Comm: kworker/u4:82 Not tainted 6.8.0-rc6-syzkaller-00120-g87adedeba51a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Workqueue: events_unbound flush_to_ldisc ==================================================================