===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected syzkaller #0 Not tainted ----------------------------------------------------- kworker/u8:5/62 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffff8eeff998 (disc_data_lock#3){.+.+}-{3:3}, at: sp_get drivers/net/hamradio/6pack.c:370 [inline] ffffffff8eeff998 (disc_data_lock#3){.+.+}-{3:3}, at: sixpack_write_wakeup+0x30/0x480 drivers/net/hamradio/6pack.c:391 and this task is already holding: ffffffff9a023c38 (&port_lock_key){-.-.}-{3:3}, at: uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] ffffffff9a023c38 (&port_lock_key){-.-.}-{3:3}, at: uart_port_ref_lock+0xc4/0x3b0 drivers/tty/serial/serial_core.c:83 which would create a new lock dependency: (&port_lock_key){-.-.}-{3:3} -> (disc_data_lock#3){.+.+}-{3:3} but this new dependency connects a HARDIRQ-irq-safe lock: (&port_lock_key){-.-.}-{3:3} ... which became HARDIRQ-irq-safe at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] serial8250_handle_irq+0x6b/0xbb0 drivers/tty/serial/8250/8250_port.c:1798 serial8250_default_handle_irq+0xbf/0x200 drivers/tty/serial/8250/8250_port.c:1846 serial8250_interrupt+0x8d/0x180 drivers/tty/serial/8250/8250_core.c:82 __handle_irq_event_percpu+0x295/0xab0 kernel/irq/handle.c:203 handle_irq_event_percpu kernel/irq/handle.c:240 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:257 handle_edge_irq+0x23b/0xa10 kernel/irq/chip.c:855 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:254 [inline] call_irq_handler arch/x86/kernel/irq.c:-1 [inline] __common_interrupt+0x141/0x1f0 arch/x86/kernel/irq.c:325 common_interrupt+0xb6/0xe0 arch/x86/kernel/irq.c:318 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:81 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline] default_idle+0x13/0x20 arch/x86/kernel/process.c:767 default_idle_call+0x73/0xb0 kernel/sched/idle.c:122 cpuidle_idle_call kernel/sched/idle.c:190 [inline] do_idle+0x1e7/0x510 kernel/sched/idle.c:330 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:428 rest_init+0x2de/0x300 init/main.c:757 start_kernel+0x3ae/0x410 init/main.c:1111 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291 common_startup_64+0x13e/0x147 to a HARDIRQ-irq-unsafe lock: (disc_data_lock#3){.+.+}-{3:3} ... which became HARDIRQ-irq-unsafe at: ... lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:370 [inline] sixpack_receive_buf+0x5c/0x1450 drivers/net/hamradio/6pack.c:433 tty_ldisc_receive_buf+0x119/0x160 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x24a/0x6e0 drivers/tty/tty_buffer.c:495 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(disc_data_lock#3); local_irq_disable(); lock(&port_lock_key); lock(disc_data_lock#3); lock(&port_lock_key); *** DEADLOCK *** 6 locks held by kworker/u8:5/62: #0: ffff88813fe09148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3238 [inline] #0: ffff88813fe09148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0 kernel/workqueue.c:3346 #1: ffffc9000213fba0 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3239 [inline] #1: ffffc9000213fba0 ((work_completion)(&buf->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0 kernel/workqueue.c:3346 #2: ffff888141f58ca0 (&buf->lock){+.+.}-{4:4}, at: flush_to_ldisc+0x38/0x6e0 drivers/tty/tty_buffer.c:467 #3: ffff888078f930a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1c/0x90 drivers/tty/tty_ldisc.c:263 #4: ffffffff9a023c38 (&port_lock_key){-.-.}-{3:3}, at: uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] #4: ffffffff9a023c38 (&port_lock_key){-.-.}-{3:3}, at: uart_port_ref_lock+0xc4/0x3b0 drivers/tty/serial/serial_core.c:83 #5: ffff888078f930a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1c/0x90 drivers/tty/tty_ldisc.c:263 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> (&port_lock_key){-.-.}-{3:3} { IN-HARDIRQ-W at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] serial8250_handle_irq+0x6b/0xbb0 drivers/tty/serial/8250/8250_port.c:1798 serial8250_default_handle_irq+0xbf/0x200 drivers/tty/serial/8250/8250_port.c:1846 serial8250_interrupt+0x8d/0x180 drivers/tty/serial/8250/8250_core.c:82 __handle_irq_event_percpu+0x295/0xab0 kernel/irq/handle.c:203 handle_irq_event_percpu kernel/irq/handle.c:240 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:257 handle_edge_irq+0x23b/0xa10 kernel/irq/chip.c:855 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:254 [inline] call_irq_handler arch/x86/kernel/irq.c:-1 [inline] __common_interrupt+0x141/0x1f0 arch/x86/kernel/irq.c:325 common_interrupt+0xb6/0xe0 arch/x86/kernel/irq.c:318 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:81 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline] default_idle+0x13/0x20 arch/x86/kernel/process.c:767 default_idle_call+0x73/0xb0 kernel/sched/idle.c:122 cpuidle_idle_call kernel/sched/idle.c:190 [inline] do_idle+0x1e7/0x510 kernel/sched/idle.c:330 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:428 rest_init+0x2de/0x300 init/main.c:757 start_kernel+0x3ae/0x410 init/main.c:1111 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291 common_startup_64+0x13e/0x147 IN-SOFTIRQ-W at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] serial8250_handle_irq+0x6b/0xbb0 drivers/tty/serial/8250/8250_port.c:1798 serial8250_default_handle_irq+0xbf/0x200 drivers/tty/serial/8250/8250_port.c:1846 serial8250_interrupt+0x8d/0x180 drivers/tty/serial/8250/8250_core.c:82 __handle_irq_event_percpu+0x295/0xab0 kernel/irq/handle.c:203 handle_irq_event_percpu kernel/irq/handle.c:240 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:257 handle_edge_irq+0x23b/0xa10 kernel/irq/chip.c:855 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:254 [inline] call_irq_handler arch/x86/kernel/irq.c:-1 [inline] __common_interrupt+0x141/0x1f0 arch/x86/kernel/irq.c:325 common_interrupt+0xb6/0xe0 arch/x86/kernel/irq.c:318 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 unwind_next_frame+0x17e7/0x2390 arch/x86/kernel/unwind_orc.c:664 arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2507 [inline] __rcu_free_sheaf_prepare+0x120/0x2a0 mm/slub.c:2713 rcu_free_sheaf+0x1f/0x110 mm/slub.c:6138 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xcab/0x1770 kernel/rcu/tree.c:2861 handle_softirqs+0x286/0x870 kernel/softirq.c:622 run_ksoftirqd+0x9b/0x100 kernel/softirq.c:1063 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 INITIAL USE at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] class_uart_port_lock_irqsave_constructor include/linux/serial_core.h:797 [inline] serial8250_do_set_termios+0x4d1/0x1c30 drivers/tty/serial/8250/8250_port.c:2760 uart_set_options+0x3c2/0x5b0 drivers/tty/serial/serial_core.c:2262 serial8250_console_setup+0x2f4/0x3c0 drivers/tty/serial/8250/8250_port.c:3405 univ8250_console_setup+0x43a/0x540 drivers/tty/serial/8250/8250_core.c:426 console_call_setup kernel/printk/printk.c:3773 [inline] try_enable_preferred_console+0x4e4/0x650 kernel/printk/printk.c:3817 register_console+0x551/0xf90 kernel/printk/printk.c:4011 univ8250_console_init+0x3a/0x70 drivers/tty/serial/8250/8250_core.c:511 console_init+0x10e/0x430 kernel/printk/printk.c:4298 start_kernel+0x254/0x410 init/main.c:1048 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291 common_startup_64+0x13e/0x147 } ... key at: [] port_lock_key+0x0/0x20 the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock: -> (disc_data_lock#3){.+.+}-{3:3} { HARDIRQ-ON-R at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:370 [inline] sixpack_receive_buf+0x5c/0x1450 drivers/net/hamradio/6pack.c:433 tty_ldisc_receive_buf+0x119/0x160 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x24a/0x6e0 drivers/tty/tty_buffer.c:495 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 SOFTIRQ-ON-R at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:370 [inline] sixpack_receive_buf+0x5c/0x1450 drivers/net/hamradio/6pack.c:433 tty_ldisc_receive_buf+0x119/0x160 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x24a/0x6e0 drivers/tty/tty_buffer.c:495 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 INITIAL READ USE at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:370 [inline] sixpack_receive_buf+0x5c/0x1450 drivers/net/hamradio/6pack.c:433 tty_ldisc_receive_buf+0x119/0x160 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x24a/0x6e0 drivers/tty/tty_buffer.c:495 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 } ... key at: [] disc_data_lock+0x18/0x100 6pack.c:-1 ... acquired at: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:370 [inline] sixpack_write_wakeup+0x30/0x480 drivers/net/hamradio/6pack.c:391 tty_wakeup+0xbe/0x100 drivers/tty/tty_io.c:515 tty_port_default_wakeup+0xfb/0x170 drivers/tty/tty_port.c:67 serial8250_tx_chars+0x72e/0x970 drivers/tty/serial/8250/8250_port.c:1719 __start_tx+0x33b/0x480 drivers/tty/serial/8250/8250_port.c:1426 __uart_start+0x23f/0x460 drivers/tty/serial/serial_core.c:161 uart_write+0xdc/0x130 drivers/tty/serial/serial_core.c:633 decode_prio_command drivers/net/hamradio/6pack.c:868 [inline] sixpack_decode drivers/net/hamradio/6pack.c:943 [inline] sixpack_receive_buf+0x447/0x1450 drivers/net/hamradio/6pack.c:447 tty_ldisc_receive_buf+0x119/0x160 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x24a/0x6e0 drivers/tty/tty_buffer.c:495 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 stack backtrace: CPU: 1 UID: 0 PID: 62 Comm: kworker/u8:5 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Workqueue: events_unbound flush_to_ldisc Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_bad_irq_dependency kernel/locking/lockdep.c:2616 [inline] check_irq_usage kernel/locking/lockdep.c:2857 [inline] check_prev_add kernel/locking/lockdep.c:3169 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0x1f05/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228 sp_get drivers/net/hamradio/6pack.c:370 [inline] sixpack_write_wakeup+0x30/0x480 drivers/net/hamradio/6pack.c:391 tty_wakeup+0xbe/0x100 drivers/tty/tty_io.c:515 tty_port_default_wakeup+0xfb/0x170 drivers/tty/tty_port.c:67 serial8250_tx_chars+0x72e/0x970 drivers/tty/serial/8250/8250_port.c:1719 __start_tx+0x33b/0x480 drivers/tty/serial/8250/8250_port.c:1426 __uart_start+0x23f/0x460 drivers/tty/serial/serial_core.c:161 uart_write+0xdc/0x130 drivers/tty/serial/serial_core.c:633 decode_prio_command drivers/net/hamradio/6pack.c:868 [inline] sixpack_decode drivers/net/hamradio/6pack.c:943 [inline] sixpack_receive_buf+0x447/0x1450 drivers/net/hamradio/6pack.c:447 tty_ldisc_receive_buf+0x119/0x160 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x24a/0x6e0 drivers/tty/tty_buffer.c:495 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 netdevsim netdevsim0 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 bridge_slave_1: left allmulticast mode bridge_slave_1: left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state bridge_slave_0: left allmulticast mode bridge_slave_0: left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state dvmrp1 (unregistering): left allmulticast mode bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond0 (unregistering): Released all slaves hsr_slave_0: left promiscuous mode hsr_slave_1: left promiscuous mode batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 batman_adv: batadv0: Interface deactivated: batadv_slave_1 batman_adv: batadv0: Removing interface: batadv_slave_1 veth1_macvtap: left promiscuous mode veth0_macvtap: left promiscuous mode veth1_vlan: left promiscuous mode team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device team_slave_0 removed