===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.1.83-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.1/6642 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire: ffff88805b1f9240 (&stab->lock){+...}-{2:2} , at: __sock_map_delete net/core/sock_map.c:416 [inline] , at: sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 and this task is already holding: ffff8880b993a258 (&pool->lock ){-.-.}-{2:2} , at: __queue_work+0x58c/0xf90 which would create a new lock dependency: ( &pool->lock){-.-.}-{2:2} -> ( &stab->lock){+...}-{2:2} but this new dependency connects a HARDIRQ-irq-safe lock: (&pool->lock ){-.-.}-{2:2} ... which became HARDIRQ-irq-safe at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 __queue_work+0x58c/0xf90 queue_work_on+0x14b/0x250 kernel/workqueue.c:1548 hrtimer_switch_to_hres kernel/time/hrtimer.c:747 [inline] hrtimer_run_queues+0x14b/0x450 kernel/time/hrtimer.c:1912 run_local_timers kernel/time/timer.c:1815 [inline] update_process_times+0x7b/0x1b0 kernel/time/timer.c:1838 tick_periodic+0x197/0x210 kernel/time/tick-common.c:100 tick_handle_periodic+0x46/0x150 kernel/time/tick-common.c:112 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline] __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112 sysvec_apic_timer_interrupt+0x8c/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] __sanitizer_cov_trace_pc+0xc/0x60 kernel/kcov.c:206 update_event_printk kernel/trace/trace_events.c:2662 [inline] trace_event_eval_update+0x69e/0xfc0 kernel/trace/trace_events.c:2788 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307 to a HARDIRQ-irq-unsafe lock: (&stab->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_map_update_common+0x1b6/0x5b0 net/core/sock_map.c:492 sock_map_update_elem_sys+0x55b/0x910 net/core/sock_map.c:581 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(&stab->lock ); local_irq_disable(); lock(&pool->lock ); lock(&stab->lock ); lock(&pool->lock ); *** DEADLOCK *** 3 locks held by syz-executor.1/6642: #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xe5/0xf90 kernel/workqueue.c:1443 #1: ffff8880b993a258 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x58c/0xf90 #2: ffffffff8d12a940 (rcu_read_lock ){....}-{1:2} , at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] , at: rcu_read_lock include/linux/rcupdate.h:791 [inline] , at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] , at: bpf_trace_run1+0xec/0x3d0 kernel/trace/bpf_trace.c:2311 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> ( &pool->lock){-.-.}-{2:2} { IN-HARDIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 __queue_work+0x58c/0xf90 queue_work_on+0x14b/0x250 kernel/workqueue.c:1548 hrtimer_switch_to_hres kernel/time/hrtimer.c:747 [inline] hrtimer_run_queues+0x14b/0x450 kernel/time/hrtimer.c:1912 run_local_timers kernel/time/timer.c:1815 [inline] update_process_times+0x7b/0x1b0 kernel/time/timer.c:1838 tick_periodic+0x197/0x210 kernel/time/tick-common.c:100 tick_handle_periodic+0x46/0x150 kernel/time/tick-common.c:112 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline] __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112 sysvec_apic_timer_interrupt+0x8c/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] __sanitizer_cov_trace_pc+0xc/0x60 kernel/kcov.c:206 update_event_printk kernel/trace/trace_events.c:2662 [inline] trace_event_eval_update+0x69e/0xfc0 kernel/trace/trace_events.c:2788 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307 IN-SOFTIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 __queue_work+0x58c/0xf90 call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1514 [inline] __run_timers+0x6a8/0x890 kernel/time/timer.c:1790 __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 unwind_next_frame+0x18fe/0x2220 arch/x86/kernel/unwind_orc.c:621 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_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 acpi_ps_alloc_op+0x192/0x3a0 acpi_ps_create_op+0x3ba/0xbe0 drivers/acpi/acpica/psobject.c:321 acpi_ps_parse_loop+0x68d/0x1c10 drivers/acpi/acpica/psloop.c:306 acpi_ps_parse_aml+0x203/0x950 drivers/acpi/acpica/psparse.c:475 acpi_ds_auto_serialize_method+0x1c2/0x240 drivers/acpi/acpica/dsmethod.c:100 acpi_ds_init_one_object+0x1b7/0x360 drivers/acpi/acpica/dsinit.c:110 acpi_ns_walk_namespace+0x28c/0x4e0 acpi_ds_initialize_objects+0x195/0x2a0 drivers/acpi/acpica/dsinit.c:189 acpi_ns_load_table+0xf5/0x120 drivers/acpi/acpica/nsload.c:106 acpi_tb_load_namespace+0x45c/0x6c0 drivers/acpi/acpica/tbxfload.c:186 acpi_load_tables+0x43/0xf1 drivers/acpi/acpica/tbxfload.c:59 acpi_bus_init+0x9a/0xa4c drivers/acpi/bus.c:1285 acpi_init+0xb0/0x224 drivers/acpi/bus.c:1397 do_one_initcall+0x265/0x8f0 init/main.c:1297 do_initcall_level+0x157/0x207 init/main.c:1370 do_initcalls+0x49/0x86 init/main.c:1386 kernel_init_freeable+0x45c/0x60f init/main.c:1625 kernel_init+0x19/0x290 init/main.c:1513 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307 INITIAL USE 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 pwq_adjust_max_active+0x14e/0x550 kernel/workqueue.c:3765 link_pwq kernel/workqueue.c:3831 [inline] alloc_and_link_pwqs kernel/workqueue.c:4227 [inline] alloc_workqueue+0xbf8/0x1440 kernel/workqueue.c:4349 workqueue_init_early+0x71a/0x927 kernel/workqueue.c:6055 start_kernel+0x208/0x53f init/main.c:1030 secondary_startup_64_no_verify+0xcf/0xdb } ... key at: [] init_worker_pool.__key+0x0/0x20 the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock: -> (&stab->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_map_update_common+0x1b6/0x5b0 net/core/sock_map.c:492 sock_map_update_elem_sys+0x55b/0x910 net/core/sock_map.c:581 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 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_map_update_common+0x1b6/0x5b0 net/core/sock_map.c:492 sock_map_update_elem_sys+0x55b/0x910 net/core/sock_map.c:581 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_map_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_map_delete net/core/sock_map.c:416 [inline] sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run1+0x1d9/0x3d0 kernel/trace/bpf_trace.c:2311 __traceiter_workqueue_activate_work+0x64/0xb0 include/trace/events/workqueue.h:59 trace_workqueue_activate_work+0x1c0/0x250 include/trace/events/workqueue.h:59 __queue_work+0xa81/0xf90 kernel/workqueue.c:1509 queue_work_on+0x14b/0x250 kernel/workqueue.c:1548 bpf_prog_load+0xda2/0x1bb0 kernel/bpf/syscall.c:2679 __sys_bpf+0x382/0x6c0 kernel/bpf/syscall.c:5005 __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 stack backtrace: CPU: 1 PID: 6642 Comm: syz-executor.1 Not tainted 6.1.83-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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_map_delete net/core/sock_map.c:416 [inline] sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run1+0x1d9/0x3d0 kernel/trace/bpf_trace.c:2311 __traceiter_workqueue_activate_work+0x64/0xb0 include/trace/events/workqueue.h:59 trace_workqueue_activate_work+0x1c0/0x250 include/trace/events/workqueue.h:59 __queue_work+0xa81/0xf90 kernel/workqueue.c:1509 queue_work_on+0x14b/0x250 kernel/workqueue.c:1548 bpf_prog_load+0xda2/0x1bb0 kernel/bpf/syscall.c:2679 __sys_bpf+0x382/0x6c0 kernel/bpf/syscall.c:5005 __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 RIP: 0033:0x7f2f1e27dda9 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:00007f2f1f0790c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f2f1e3abf80 RCX: 00007f2f1e27dda9 RDX: 0000000000000090 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007f2f1e2ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2f1e3abf80 R15: 00007ffc67482408