===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.1.82-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.1/13596 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire: ffff88807c739020 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932 and this task is already holding: ffff88801ef69158 (&port->lock){-.-.}-{2:2}, at: tty_insert_flip_string_and_push_buffer+0x3a/0x390 drivers/tty/tty_buffer.c:628 which would create a new lock dependency: (&port->lock){-.-.}-{2:2} -> (&htab->buckets[i].lock){+.-.}-{2:2} but this new dependency connects a HARDIRQ-irq-safe lock: (&port->lock){-.-.}-{2:2} ... which became HARDIRQ-irq-safe at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 tty_port_tty_get drivers/tty/tty_port.c:327 [inline] tty_port_default_wakeup+0x1f/0xf0 drivers/tty/tty_port.c:68 serial8250_tx_chars+0x60d/0x800 drivers/tty/serial/8250/8250_port.c:1860 serial8250_handle_irq+0x4ff/0x6a0 drivers/tty/serial/8250/8250_port.c:1967 serial8250_default_handle_irq+0xc8/0x1e0 drivers/tty/serial/8250/8250_port.c:1987 serial8250_interrupt+0xa1/0x1e0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x245/0xbf0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_write+0x6af/0x930 drivers/tty/serial/serial_core.c:600 process_output_block drivers/tty/n_tty.c:586 [inline] n_tty_write+0xd7f/0x1260 drivers/tty/n_tty.c:2367 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x504/0x890 drivers/tty/tty_io.c:1089 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd to a HARDIRQ-irq-unsafe lock: (&htab->buckets[i].lock){+.-.}-{2:2} ... which became HARDIRQ-irq-unsafe at: ... lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_update_common+0x20c/0xa30 net/core/sock_map.c:1000 sock_map_update_elem_sys+0x5a0/0x910 net/core/sock_map.c:583 map_update_elem+0x503/0x680 kernel/bpf/syscall.c:1448 __sys_bpf+0x337/0x6c0 kernel/bpf/syscall.c:4993 __do_sys_bpf kernel/bpf/syscall.c:5109 [inline] __se_sys_bpf kernel/bpf/syscall.c:5107 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&htab->buckets[i].lock); local_irq_disable(); lock(&port->lock); lock(&htab->buckets[i].lock); lock(&port->lock); *** DEADLOCK *** 6 locks held by syz-executor.1/13596: #0: ffff888084db5098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244 #1: ffff888084db5130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:944 [inline] #1: ffff888084db5130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:967 [inline] #1: ffff888084db5130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x1f5/0x890 drivers/tty/tty_io.c:1089 #2: ffff888084db52e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x25e/0x1260 drivers/tty/n_tty.c:2350 #3: ffffc9000b0f3380 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x5fa/0x1260 drivers/tty/n_tty.c:2389 #4: ffff88801ef69158 (&port->lock){-.-.}-{2:2}, at: tty_insert_flip_string_and_push_buffer+0x3a/0x390 drivers/tty/tty_buffer.c:628 #5: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:319 [inline] #5: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:760 [inline] #5: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #5: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16a/0x470 kernel/trace/bpf_trace.c:2314 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> (&port->lock){-.-.}-{2:2} { IN-HARDIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 tty_port_tty_get drivers/tty/tty_port.c:327 [inline] tty_port_default_wakeup+0x1f/0xf0 drivers/tty/tty_port.c:68 serial8250_tx_chars+0x60d/0x800 drivers/tty/serial/8250/8250_port.c:1860 serial8250_handle_irq+0x4ff/0x6a0 drivers/tty/serial/8250/8250_port.c:1967 serial8250_default_handle_irq+0xc8/0x1e0 drivers/tty/serial/8250/8250_port.c:1987 serial8250_interrupt+0xa1/0x1e0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x245/0xbf0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] uart_write+0x6af/0x930 drivers/tty/serial/serial_core.c:600 process_output_block drivers/tty/n_tty.c:586 [inline] n_tty_write+0xd7f/0x1260 drivers/tty/n_tty.c:2367 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x504/0x890 drivers/tty/tty_io.c:1089 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd IN-SOFTIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 tty_port_tty_get drivers/tty/tty_port.c:327 [inline] tty_port_default_wakeup+0x1f/0xf0 drivers/tty/tty_port.c:68 serial8250_tx_chars+0x60d/0x800 drivers/tty/serial/8250/8250_port.c:1860 serial8250_handle_irq+0x4ff/0x6a0 drivers/tty/serial/8250/8250_port.c:1967 serial8250_default_handle_irq+0xc8/0x1e0 drivers/tty/serial/8250/8250_port.c:1987 serial8250_interrupt+0xa1/0x1e0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x245/0xbf0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0x4a/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 memset_erms+0xb/0x10 arch/x86/lib/memset_64.S:64 unwind_next_frame+0xde7/0x2220 arch/x86/kernel/unwind_orc.c:546 arch_stack_walk+0x10d/0x140 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x292/0x510 mm/slub.c:3683 rcu_do_batch kernel/rcu/tree.c:2296 [inline] rcu_core+0xad4/0x17e0 kernel/rcu/tree.c:2556 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 __d_lookup_rcu+0x160/0x4c0 fs/dcache.c:2378 lookup_fast+0xc6/0x490 fs/namei.c:1625 walk_component fs/namei.c:1994 [inline] link_path_walk+0x604/0xee0 fs/namei.c:2325 path_lookupat+0xa9/0x450 fs/namei.c:2478 filename_lookup+0x251/0x600 fs/namei.c:2508 user_path_at_empty+0x3e/0x60 fs/namei.c:2907 user_path_at include/linux/namei.h:57 [inline] do_faccessat+0x3b4/0x890 fs/open.c:446 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:376 [inline] tty_port_open+0x37/0x2c0 drivers/tty/tty_port.c:768 uart_open+0x43/0x50 drivers/tty/serial/serial_core.c:1938 tty_open+0x4c2/0xdd0 drivers/tty/tty_io.c:2145 chrdev_open+0x54a/0x630 fs/char_dev.c:414 do_dentry_open+0x7f9/0x10f0 fs/open.c:882 do_open fs/namei.c:3628 [inline] path_openat+0x2644/0x2e60 fs/namei.c:3785 do_filp_open+0x230/0x480 fs/namei.c:3812 file_open_name fs/open.c:1263 [inline] filp_open+0x25d/0x2c0 fs/open.c:1283 console_on_rootfs+0x19/0x5c init/main.c:1581 kernel_init_freeable+0x466/0x60f init/main.c:1629 kernel_init+0x19/0x290 init/main.c:1512 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307 } ... key at: [] tty_port_init.__key.7+0x0/0x20 the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock: -> (&htab->buckets[i].lock){+.-.}-{2:2} { HARDIRQ-ON-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_update_common+0x20c/0xa30 net/core/sock_map.c:1000 sock_map_update_elem_sys+0x5a0/0x910 net/core/sock_map.c:583 map_update_elem+0x503/0x680 kernel/bpf/syscall.c:1448 __sys_bpf+0x337/0x6c0 kernel/bpf/syscall.c:4993 __do_sys_bpf kernel/bpf/syscall.c:5109 [inline] __se_sys_bpf kernel/bpf/syscall.c:5107 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd IN-SOFTIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314 __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline] __alloc_pages+0x717/0x770 mm/page_alloc.c:5567 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] kmem_cache_alloc_node+0x1cf/0x310 mm/slub.c:3443 __alloc_skb+0xde/0x670 net/core/skbuff.c:505 skb_copy+0xeb/0x760 net/core/skbuff.c:1725 mac80211_hwsim_tx_frame_no_nl+0x10f4/0x1a70 drivers/net/wireless/mac80211_hwsim.c:1724 mac80211_hwsim_tx_frame+0x1cc/0x220 drivers/net/wireless/mac80211_hwsim.c:2053 mac80211_hwsim_beacon_tx+0x5f8/0xaa0 drivers/net/wireless/mac80211_hwsim.c:2116 __iterate_interfaces+0x21e/0x4b0 net/mac80211/util.c:788 ieee80211_iterate_active_interfaces_atomic+0xd4/0x170 net/mac80211/util.c:824 mac80211_hwsim_beacon+0xd0/0x1e0 drivers/net/wireless/mac80211_hwsim.c:2142 __run_hrtimer kernel/time/hrtimer.c:1686 [inline] __hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1750 hrtimer_run_softirq+0x196/0x2c0 kernel/time/hrtimer.c:1767 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 get_current arch/x86/include/asm/current.h:15 [inline] __syscall_enter_from_user_work kernel/entry/common.c:91 [inline] syscall_enter_from_user_mode+0x37/0x220 kernel/entry/common.c:112 do_syscall_64+0x1e/0xb0 arch/x86/entry/common.c:77 entry_SYSCALL_64_after_hwframe+0x63/0xcd INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_update_common+0x20c/0xa30 net/core/sock_map.c:1000 sock_map_update_elem_sys+0x5a0/0x910 net/core/sock_map.c:583 map_update_elem+0x503/0x680 kernel/bpf/syscall.c:1448 __sys_bpf+0x337/0x6c0 kernel/bpf/syscall.c:4993 __do_sys_bpf kernel/bpf/syscall.c:5109 [inline] __se_sys_bpf kernel/bpf/syscall.c:5107 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd } ... key at: [] sock_hash_alloc.__key+0x0/0x20 ... acquired at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314 __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline] __alloc_pages+0x717/0x770 mm/page_alloc.c:5567 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474 save_stack+0x104/0x1e0 mm/page_owner.c:128 __set_page_owner+0x26/0x390 mm/page_owner.c:190 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5545 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:561 [inline] tty_buffer_alloc drivers/tty/tty_buffer.c:180 [inline] __tty_buffer_request_room+0x1f1/0x470 drivers/tty/tty_buffer.c:278 tty_insert_flip_string_fixed_flag drivers/tty/tty_buffer.c:327 [inline] tty_insert_flip_string include/linux/tty_flip.h:41 [inline] tty_insert_flip_string_and_push_buffer+0x7c/0x390 drivers/tty/tty_buffer.c:629 n_tty_write+0x63e/0x1260 drivers/tty/n_tty.c:2390 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x504/0x890 drivers/tty/tty_io.c:1089 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd stack backtrace: CPU: 1 PID: 13596 Comm: syz-executor.1 Not tainted 6.1.82-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_bad_irq_dependency kernel/locking/lockdep.c:2604 [inline] check_irq_usage kernel/locking/lockdep.c:2843 [inline] check_prev_add kernel/locking/lockdep.c:3094 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain+0x4d16/0x5950 kernel/locking/lockdep.c:3825 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314 __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline] __alloc_pages+0x717/0x770 mm/page_alloc.c:5567 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474 save_stack+0x104/0x1e0 mm/page_owner.c:128 __set_page_owner+0x26/0x390 mm/page_owner.c:190 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5545 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:561 [inline] tty_buffer_alloc drivers/tty/tty_buffer.c:180 [inline] __tty_buffer_request_room+0x1f1/0x470 drivers/tty/tty_buffer.c:278 tty_insert_flip_string_fixed_flag drivers/tty/tty_buffer.c:327 [inline] tty_insert_flip_string include/linux/tty_flip.h:41 [inline] tty_insert_flip_string_and_push_buffer+0x7c/0x390 drivers/tty/tty_buffer.c:629 n_tty_write+0x63e/0x1260 drivers/tty/n_tty.c:2390 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x504/0x890 drivers/tty/tty_io.c:1089 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5c8627dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5c84dfe0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f5c863abf80 RCX: 00007f5c8627dda9 RDX: 0000000000000040 RSI: 0000000020000200 RDI: 0000000000000007 RBP: 00007f5c862ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f5c863abf80 R15: 00007fff68640298 ------------[ cut here ]------------ raw_local_irq_restore() called with IRQs enabled WARNING: CPU: 1 PID: 13596 at kernel/locking/irqflag-debug.c:10 warn_bogus_irq_restore+0x1d/0x20 kernel/locking/irqflag-debug.c:10 Modules linked in: CPU: 1 PID: 13596 Comm: syz-executor.1 Not tainted 6.1.82-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 RIP: 0010:warn_bogus_irq_restore+0x1d/0x20 kernel/locking/irqflag-debug.c:10 Code: 24 48 c7 c7 80 bb ea 8a e8 1c f5 fd ff 80 3d 4d e4 d5 03 00 74 01 c3 c6 05 43 e4 d5 03 01 48 c7 c7 e0 e5 eb 8a e8 b3 f3 c8 f6 <0f> 0b c3 41 56 53 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 44 RSP: 0018:ffffc9000a9f7978 EFLAGS: 00010246 RAX: bff0d4c913a86d00 RBX: 1ffff9200153ef34 RCX: 0000000000040000 RDX: ffffc90005711000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc9000a9f7a08 R08: ffffffff81527e8e R09: fffffbfff1a23db1 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 1ffff9200153ef30 R14: ffffc9000a9f79a0 R15: 0000000000000246 FS: 00007f5c84dfe6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd9256d56c6 CR3: 000000008401e000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] _raw_spin_unlock_irqrestore+0x118/0x130 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] tty_insert_flip_string_and_push_buffer+0x2f3/0x390 drivers/tty/tty_buffer.c:632 n_tty_write+0x63e/0x1260 drivers/tty/n_tty.c:2390 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x504/0x890 drivers/tty/tty_io.c:1089 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5c8627dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5c84dfe0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f5c863abf80 RCX: 00007f5c8627dda9 RDX: 0000000000000040 RSI: 0000000020000200 RDI: 0000000000000007 RBP: 00007f5c862ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f5c863abf80 R15: 00007fff68640298