===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected syzkaller #0 Not tainted ----------------------------------------------------- kworker/u4:6/4295 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffff8cac6c58 (disc_data_lock){.+.+}-{2:2}, at: sp_get drivers/net/hamradio/6pack.c:375 [inline] ffffffff8cac6c58 (disc_data_lock){.+.+}-{2:2}, at: sixpack_write_wakeup+0x2c/0x400 drivers/net/hamradio/6pack.c:396 and this task is already holding: ffffffff963d82a0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x105/0x880 drivers/tty/serial/serial_core.c:571 which would create a new lock dependency: (&port_lock_key){-.-.}-{2:2} -> (disc_data_lock){.+.+}-{2:2} but this new dependency connects a HARDIRQ-irq-safe lock: (&port_lock_key){-.-.}-{2:2} ... which became HARDIRQ-irq-safe at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 serial8250_handle_irq+0x6c/0x610 drivers/tty/serial/8250/8250_port.c:1895 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline] default_idle+0xb/0x10 arch/x86/kernel/process.c:729 default_idle_call+0x81/0xc0 kernel/sched/idle.c:112 cpuidle_idle_call kernel/sched/idle.c:194 [inline] do_idle+0x21b/0x5b0 kernel/sched/idle.c:306 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_secondary+0x31f/0x430 arch/x86/kernel/smpboot.c:281 secondary_startup_64_no_verify+0xb1/0xbb to a HARDIRQ-irq-unsafe lock: (disc_data_lock){.+.+}-{2:2} ... which became HARDIRQ-irq-unsafe at: ... lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:375 [inline] sixpack_receive_buf+0x4d/0x12f0 drivers/net/hamradio/6pack.c:438 tty_ldisc_receive_buf+0x113/0x150 drivers/tty/tty_buffer.c:455 tty_port_default_receive_buf+0x69/0x90 drivers/tty/tty_port.c:39 receive_buf drivers/tty/tty_buffer.c:471 [inline] flush_to_ldisc+0x2a7/0x530 drivers/tty/tty_buffer.c:523 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(disc_data_lock); local_irq_disable(); lock(&port_lock_key); lock(disc_data_lock); lock(&port_lock_key); *** DEADLOCK *** 6 locks held by kworker/u4:6/4295: #0: ffff888016879138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1 #1: ffffc900034ffd00 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285 #2: ffff888147458ca0 (&buf->lock){+.+.}-{3:3}, at: flush_to_ldisc+0x34/0x530 drivers/tty/tty_buffer.c:495 #3: ffff8880660f4098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x18/0x80 drivers/tty/tty_ldisc.c:273 #4: ffffffff963d82a0 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x105/0x880 drivers/tty/serial/serial_core.c:571 #5: ffff8880660f4098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x18/0x80 drivers/tty/tty_ldisc.c:273 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> (&port_lock_key){-.-.}-{2:2} { IN-HARDIRQ-W at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 serial8250_handle_irq+0x6c/0x610 drivers/tty/serial/8250/8250_port.c:1895 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline] default_idle+0xb/0x10 arch/x86/kernel/process.c:729 default_idle_call+0x81/0xc0 kernel/sched/idle.c:112 cpuidle_idle_call kernel/sched/idle.c:194 [inline] do_idle+0x21b/0x5b0 kernel/sched/idle.c:306 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_secondary+0x31f/0x430 arch/x86/kernel/smpboot.c:281 secondary_startup_64_no_verify+0xb1/0xbb IN-SOFTIRQ-W at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 serial8250_handle_irq+0x6c/0x610 drivers/tty/serial/8250/8250_port.c:1895 serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941 serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213 handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:233 [inline] __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252 common_interrupt+0x59/0xd0 arch/x86/kernel/irq.c:242 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667 ffs arch/x86/include/asm/bitops.h:297 [inline] handle_softirqs+0x1a9/0x820 kernel/softirq.c:564 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 stack_trace_consume_entry+0x62/0x270 kernel/stacktrace.c:89 arch_stack_walk+0x100/0x140 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0x98/0xe0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 tomoyo_realpath_from_path+0x5d8/0x610 security/tomoyo/realpath.c:291 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1cd/0x510 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_statx+0x149/0x4d0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat fs/stat.c:411 [inline] __se_sys_newfstatat fs/stat.c:405 [inline] __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 INITIAL USE at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 serial8250_do_set_termios+0x54d/0x1840 drivers/tty/serial/8250/8250_port.c:2772 uart_set_options+0x3c2/0x5d0 drivers/tty/serial/serial_core.c:2154 serial8250_console_setup+0x2ce/0x3a0 drivers/tty/serial/8250/8250_port.c:3447 univ8250_console_setup+0xe9/0x180 drivers/tty/serial/8250/8250_core.c:605 console_call_setup+0xd3/0xf0 kernel/printk/printk.c:2897 try_enable_preferred_console+0x43c/0x5a0 kernel/printk/printk.c:2938 register_console+0x2fd/0x960 kernel/printk/printk.c:3037 univ8250_console_init+0x41/0x50 drivers/tty/serial/8250/8250_core.c:690 console_init+0x177/0x5d0 kernel/printk/printk.c:3207 start_kernel+0x2f9/0x530 init/main.c:1090 secondary_startup_64_no_verify+0xb1/0xbb } ... key at: [] port_lock_key+0x0/0x20 the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock: -> (disc_data_lock){.+.+}-{2:2} { HARDIRQ-ON-R at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:375 [inline] sixpack_receive_buf+0x4d/0x12f0 drivers/net/hamradio/6pack.c:438 tty_ldisc_receive_buf+0x113/0x150 drivers/tty/tty_buffer.c:455 tty_port_default_receive_buf+0x69/0x90 drivers/tty/tty_port.c:39 receive_buf drivers/tty/tty_buffer.c:471 [inline] flush_to_ldisc+0x2a7/0x530 drivers/tty/tty_buffer.c:523 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 SOFTIRQ-ON-R at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:375 [inline] sixpack_receive_buf+0x4d/0x12f0 drivers/net/hamradio/6pack.c:438 tty_ldisc_receive_buf+0x113/0x150 drivers/tty/tty_buffer.c:455 tty_port_default_receive_buf+0x69/0x90 drivers/tty/tty_port.c:39 receive_buf drivers/tty/tty_buffer.c:471 [inline] flush_to_ldisc+0x2a7/0x530 drivers/tty/tty_buffer.c:523 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 INITIAL USE at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0x9f/0xe0 kernel/locking/spinlock.c:316 sixpack_close+0x28/0x1e0 drivers/net/hamradio/6pack.c:651 tty_ldisc_kill+0xa6/0x1a0 drivers/tty/tty_ldisc.c:629 tty_ldisc_release+0x170/0x200 drivers/tty/tty_ldisc.c:803 tty_release_struct+0x26/0xd0 drivers/tty/tty_io.c:1708 tty_release+0xd0c/0x16c0 drivers/tty/tty_io.c:1880 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 INITIAL READ USE at: lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:375 [inline] sixpack_receive_buf+0x4d/0x12f0 drivers/net/hamradio/6pack.c:438 tty_ldisc_receive_buf+0x113/0x150 drivers/tty/tty_buffer.c:455 tty_port_default_receive_buf+0x69/0x90 drivers/tty/tty_port.c:39 receive_buf drivers/tty/tty_buffer.c:471 [inline] flush_to_ldisc+0x2a7/0x530 drivers/tty/tty_buffer.c:523 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 } ... key at: [] disc_data_lock+0x18/0x100 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:375 [inline] sixpack_write_wakeup+0x2c/0x400 drivers/net/hamradio/6pack.c:396 tty_wakeup+0xb4/0xf0 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0xa5/0xf0 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x629/0x830 drivers/tty/serial/8250/8250_port.c:1828 __start_tx drivers/tty/serial/8250/8250_port.c:1548 [inline] serial8250_start_tx+0x7e9/0xa20 drivers/tty/serial/8250/8250_port.c:1652 __uart_start drivers/tty/serial/serial_core.c:132 [inline] uart_write+0x61e/0x880 drivers/tty/serial/serial_core.c:591 decode_prio_command drivers/net/hamradio/6pack.c:886 [inline] sixpack_decode drivers/net/hamradio/6pack.c:959 [inline] sixpack_receive_buf+0x421/0x12f0 drivers/net/hamradio/6pack.c:452 tty_ldisc_receive_buf+0x113/0x150 drivers/tty/tty_buffer.c:455 tty_port_default_receive_buf+0x69/0x90 drivers/tty/tty_port.c:39 receive_buf drivers/tty/tty_buffer.c:471 [inline] flush_to_ldisc+0x2a7/0x530 drivers/tty/tty_buffer.c:523 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 stack backtrace: CPU: 0 PID: 4295 Comm: kworker/u4:6 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Workqueue: events_unbound flush_to_ldisc Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_bad_irq_dependency kernel/locking/lockdep.c:2567 [inline] check_irq_usage kernel/locking/lockdep.c:2806 [inline] check_prev_add kernel/locking/lockdep.c:3057 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x65dd/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:375 [inline] sixpack_write_wakeup+0x2c/0x400 drivers/net/hamradio/6pack.c:396 tty_wakeup+0xb4/0xf0 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0xa5/0xf0 drivers/tty/tty_port.c:51 serial8250_tx_chars+0x629/0x830 drivers/tty/serial/8250/8250_port.c:1828 __start_tx drivers/tty/serial/8250/8250_port.c:1548 [inline] serial8250_start_tx+0x7e9/0xa20 drivers/tty/serial/8250/8250_port.c:1652 __uart_start drivers/tty/serial/serial_core.c:132 [inline] uart_write+0x61e/0x880 drivers/tty/serial/serial_core.c:591 decode_prio_command drivers/net/hamradio/6pack.c:886 [inline] sixpack_decode drivers/net/hamradio/6pack.c:959 [inline] sixpack_receive_buf+0x421/0x12f0 drivers/net/hamradio/6pack.c:452 tty_ldisc_receive_buf+0x113/0x150 drivers/tty/tty_buffer.c:455 tty_port_default_receive_buf+0x69/0x90 drivers/tty/tty_port.c:39 receive_buf drivers/tty/tty_buffer.c:471 [inline] flush_to_ldisc+0x2a7/0x530 drivers/tty/tty_buffer.c:523 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287