================================ WARNING: inconsistent lock state 5.15.153-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. swapper/0/0 [HC0[0]:SC0[0]:HE0:SE1] takes: ffff8880b9a3a318 (&rq->__lock ){?.-.}-{2:2} , at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 {IN-HARDIRQ-W} state was registered at: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 _raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:368 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 raw_spin_rq_lock kernel/sched/sched.h:1326 [inline] rq_lock kernel/sched/sched.h:1621 [inline] scheduler_tick+0x97/0x500 kernel/sched/core.c:5296 update_process_times+0x1ca/0x200 kernel/time/timer.c:1793 tick_periodic+0x197/0x210 kernel/time/tick-common.c:100 tick_handle_periodic+0x46/0x150 kernel/time/tick-common.c:112 timer_interrupt+0x4d/0x60 arch/x86/kernel/time.c:57 __handle_irq_event_percpu+0x292/0xa70 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0xff/0x2b0 kernel/irq/handle.c:213 handle_level_irq+0x3ab/0x6c0 kernel/irq/chip.c:653 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:629 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 __setup_irq+0x1302/0x1d90 kernel/irq/manage.c:1817 request_threaded_irq+0x2a7/0x380 kernel/irq/manage.c:2206 request_irq include/linux/interrupt.h:168 [inline] setup_default_timer_irq+0x1f/0x30 arch/x86/kernel/time.c:70 x86_late_time_init+0x51/0x86 arch/x86/kernel/time.c:94 start_kernel+0x40a/0x535 init/main.c:1101 secondary_startup_64_no_verify+0xb1/0xbb irq event stamp: 148078 hardirqs last enabled at (148075): [] tick_nohz_idle_exit+0x429/0x550 kernel/time/tick-sched.c:1344 hardirqs last disabled at (148076): [] __schedule+0x2da/0x45b0 kernel/sched/core.c:6272 softirqs last enabled at (148078): [] sock_hash_delete_elem+0x1a0/0x2f0 net/core/sock_map.c:945 softirqs last disabled at (148077): [] sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:937 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock( &rq->__lock ); lock(&rq->__lock ); *** DEADLOCK *** 2 locks held by swapper/0/0: #0: ffff8880b9a3a318 (&rq->__lock ){?.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 #1: ffffffff8c91f720 (rcu_read_lock ){....}-{1:2} , at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.15.153-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 valid_state+0x134/0x1c0 kernel/locking/lockdep.c:3932 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4135 mark_lock+0x21a/0x340 kernel/locking/lockdep.c:4591 mark_held_locks kernel/locking/lockdep.c:4193 [inline] __trace_hardirqs_on_caller kernel/locking/lockdep.c:4211 [inline] lockdep_hardirqs_on_prepare+0x27d/0x7a0 kernel/locking/lockdep.c:4278 trace_hardirqs_on+0x67/0x80 kernel/trace/trace_preemptirq.c:49 __local_bh_enable_ip+0x164/0x1f0 kernel/softirq.c:388 sock_hash_delete_elem+0x1a0/0x2f0 net/core/sock_map.c:945 bpf_prog_2c29ac5cdc6b1842+0x3a/0xd34 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918 trace_sched_switch include/trace/events/sched.h:220 [inline] __schedule+0x1e8d/0x45b0 kernel/sched/core.c:6373 schedule_idle+0x4a/0x90 kernel/sched/core.c:6487 do_idle+0x61e/0x670 kernel/sched/idle.c:334 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_kernel+0x48c/0x535 init/main.c:1138 secondary_startup_64_no_verify+0xb1/0xbb