------------[ cut here ]------------
======================================================
WARNING: possible circular locking dependency detected
6.1.82-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.2/15679 is trying to acquire lock:
ffffffff8d006ad8 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:139
but task is already holding lock:
ffff8880b983aa18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&rq->__lock){-.-.}-{2:2}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
_raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:378
raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
raw_spin_rq_lock kernel/sched/sched.h:1354 [inline]
rq_lock kernel/sched/sched.h:1644 [inline]
task_fork_fair+0x5d/0x350 kernel/sched/fair.c:11863
sched_cgroup_fork+0x374/0x400 kernel/sched/core.c:4686
copy_process+0x2442/0x4060 kernel/fork.c:2384
kernel_clone+0x222/0x920 kernel/fork.c:2682
user_mode_thread+0x12e/0x190 kernel/fork.c:2758
rest_init+0x23/0x300 init/main.c:696
start_kernel+0x0/0x53f init/main.c:891
start_kernel+0x496/0x53f init/main.c:1138
secondary_startup_64_no_verify+0xcf/0xdb
-> #1 (&p->pi_lock){-.-.}-{2:2}:
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
try_to_wake_up+0xad/0x12e0 kernel/sched/core.c:4112
up+0x6e/0x90 kernel/locking/semaphore.c:191
__up_console_sem+0x11a/0x1e0 kernel/printk/printk.c:260
__console_unlock kernel/printk/printk.c:2662 [inline]
console_unlock+0x591/0x7c0 kernel/printk/printk.c:2873
vprintk_emit+0x523/0x740 kernel/printk/printk.c:2268
_printk+0xd1/0x111 kernel/printk/printk.c:2293
__ext4_msg+0x2d3/0x2e0 fs/ext4/super.c:938
ext4_put_super+0xb2/0x10e0 fs/ext4/super.c:1217
generic_shutdown_super+0x130/0x340 fs/super.c:501
kill_block_super+0x7a/0xe0 fs/super.c:1459
deactivate_locked_super+0xa0/0x110 fs/super.c:332
cleanup_mnt+0x490/0x520 fs/namespace.c:1186
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x63/0xcd
-> #0 ((console_sem).lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1661/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_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x105/0x250 kernel/printk/printk.c:243
console_trylock kernel/printk/printk.c:2615 [inline]
console_trylock_spinning kernel/printk/printk.c:1867 [inline]
vprintk_emit+0x1ee/0x740 kernel/printk/printk.c:2267
_printk+0xd1/0x111 kernel/printk/printk.c:2293
__report_bug lib/bug.c:195 [inline]
report_bug+0x342/0x500 lib/bug.c:219
handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:324
exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:345
asm_exc_invalid_op+0x16/0x20 arch/x86/include/asm/idtentry.h:568
__local_bh_enable_ip+0x1b3/0x1f0
__sock_map_delete net/core/sock_map.c:426 [inline]
sock_map_delete_elem+0xcb/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: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
__traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x2116/0x4550 kernel/sched/core.c:6555
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870
irqentry_exit+0x53/0x80 kernel/entry/common.c:433
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
stack_trace_consume_entry+0x47/0x270 kernel/stacktrace.c:86
arch_stack_walk+0x101/0x140 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
call_rcu+0x163/0xa10 kernel/rcu/tree.c:2844
release_probes kernel/tracepoint.c:164 [inline]
tracepoint_add_func+0x618/0x9d0 kernel/tracepoint.c:386
tracepoint_probe_register_prio_may_exist+0x11e/0x190 kernel/tracepoint.c:482
bpf_raw_tp_link_attach+0x456/0x6b0 kernel/bpf/syscall.c:3372
bpf_raw_tracepoint_open+0x196/0x210 kernel/bpf/syscall.c:3399
__sys_bpf+0x4a7/0x6c0 kernel/bpf/syscall.c:5047
__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:
Chain exists of:
(console_sem).lock --> &p->pi_lock --> &rq->__lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&rq->__lock);
lock(&p->pi_lock);
lock(&rq->__lock);
lock((console_sem).lock);
*** DEADLOCK ***
3 locks held by syz-executor.2/15679:
#0: ffffffff8d1713a8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio_may_exist+0xb7/0x190 kernel/tracepoint.c:478
#1: ffff8880b983aa18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:319 [inline]
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:760 [inline]
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16a/0x470 kernel/trace/bpf_trace.c:2314
stack backtrace:
CPU: 0 PID: 15679 Comm: syz-executor.2 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
check_noncircular+0x2fa/0x3b0 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1661/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_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x105/0x250 kernel/printk/printk.c:243
console_trylock kernel/printk/printk.c:2615 [inline]
console_trylock_spinning kernel/printk/printk.c:1867 [inline]
vprintk_emit+0x1ee/0x740 kernel/printk/printk.c:2267
_printk+0xd1/0x111 kernel/printk/printk.c:2293
__report_bug lib/bug.c:195 [inline]
report_bug+0x342/0x500 lib/bug.c:219
handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:324
exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:345
asm_exc_invalid_op+0x16/0x20 arch/x86/include/asm/idtentry.h:568
RIP: 0010:__local_bh_enable_ip+0x1b3/0x1f0 kernel/softirq.c:376
Code: 04 25 28 00 00 00 48 3b 44 24 60 75 4a 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 0f 0b e9 d0 fe ff ff e8 3f 00 00 00 eb a2 <0f> 0b e9 02 ff ff ff 48 c7 c1 64 97 73 8e 80 e1 07 80 c1 03 38 c1
RSP: 0018:ffffc9000324efa0 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 1ffff92000649df8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000201 RDI: ffffffff8897624b
RBP: ffffc9000324f058 R08: dffffc0000000000 R09: ffffed100f448f46
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888028469c80 R14: ffffc9000324efe0 R15: 0000000000000201
__sock_map_delete net/core/sock_map.c:426 [inline]
sock_map_delete_elem+0xcb/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: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
__traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x2116/0x4550 kernel/sched/core.c:6555
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870
irqentry_exit+0x53/0x80 kernel/entry/common.c:433
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:stack_trace_consume_entry+0x47/0x270 kernel/stacktrace.c:86
Code: 4f 10 4d 89 cf 49 c1 ef 03 41 0f b6 04 17 84 c0 0f 85 02 01 00 00 44 8b 43 10 48 8d 6b 08 49 89 ec 49 c1 ec 03 41 0f b6 04 14 <84> c0 0f 85 16 01 00 00 44 3b 45 00 73 3c 48 8d 7b 0c 49 89 fd 49
RSP: 0018:ffffc9000324f510 EFLAGS: 00000a06
RAX: 0000000000000000 RBX: ffffc9000324f640 RCX: ffffffff8fb0d000
RDX: dffffc0000000000 RSI: ffffffff81e1cbeb RDI: ffffc9000324f640
RBP: ffffc9000324f648 R08: 0000000000000000 R09: ffffc9000324f650
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000649ec9
R13: ffffffff81783e10 R14: ffffc9000324f640 R15: 1ffff92000649eca
arch_stack_walk+0x101/0x140 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
call_rcu+0x163/0xa10 kernel/rcu/tree.c:2844
release_probes kernel/tracepoint.c:164 [inline]
tracepoint_add_func+0x618/0x9d0 kernel/tracepoint.c:386
tracepoint_probe_register_prio_may_exist+0x11e/0x190 kernel/tracepoint.c:482
bpf_raw_tp_link_attach+0x456/0x6b0 kernel/bpf/syscall.c:3372
bpf_raw_tracepoint_open+0x196/0x210 kernel/bpf/syscall.c:3399
__sys_bpf+0x4a7/0x6c0 kernel/bpf/syscall.c:5047
__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:0x7f244e67dda9
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:00007f244f3610c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f244e7abf80 RCX: 00007f244e67dda9
RDX: 0000000000000010 RSI: 0000000020000540 RDI: 0000000000000011
RBP: 00007f244e6ca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f244e7abf80 R15: 00007ffced3cade8
WARNING: CPU: 0 PID: 15679 at kernel/softirq.c:376 __local_bh_enable_ip+0x1b3/0x1f0
Modules linked in:
CPU: 0 PID: 15679 Comm: syz-executor.2 Not tainted 6.1.82-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
RIP: 0010:__local_bh_enable_ip+0x1b3/0x1f0 kernel/softirq.c:376
Code: 04 25 28 00 00 00 48 3b 44 24 60 75 4a 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 0f 0b e9 d0 fe ff ff e8 3f 00 00 00 eb a2 <0f> 0b e9 02 ff ff ff 48 c7 c1 64 97 73 8e 80 e1 07 80 c1 03 38 c1
RSP: 0018:ffffc9000324efa0 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 1ffff92000649df8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000201 RDI: ffffffff8897624b
RBP: ffffc9000324f058 R08: dffffc0000000000 R09: ffffed100f448f46
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888028469c80 R14: ffffc9000324efe0 R15: 0000000000000201
FS: 00007f244f3616c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33221000 CR3: 000000006240e000 CR4: 00000000003506f0
Call Trace:
__sock_map_delete net/core/sock_map.c:426 [inline]
sock_map_delete_elem+0xcb/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: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
__traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x2116/0x4550 kernel/sched/core.c:6555
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870
irqentry_exit+0x53/0x80 kernel/entry/common.c:433
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:stack_trace_consume_entry+0x47/0x270 kernel/stacktrace.c:86
Code: 4f 10 4d 89 cf 49 c1 ef 03 41 0f b6 04 17 84 c0 0f 85 02 01 00 00 44 8b 43 10 48 8d 6b 08 49 89 ec 49 c1 ec 03 41 0f b6 04 14 <84> c0 0f 85 16 01 00 00 44 3b 45 00 73 3c 48 8d 7b 0c 49 89 fd 49
RSP: 0018:ffffc9000324f510 EFLAGS: 00000a06
RAX: 0000000000000000 RBX: ffffc9000324f640 RCX: ffffffff8fb0d000
RDX: dffffc0000000000 RSI: ffffffff81e1cbeb RDI: ffffc9000324f640
RBP: ffffc9000324f648 R08: 0000000000000000 R09: ffffc9000324f650
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000649ec9
R13: ffffffff81783e10 R14: ffffc9000324f640 R15: 1ffff92000649eca
arch_stack_walk+0x101/0x140 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
call_rcu+0x163/0xa10 kernel/rcu/tree.c:2844
release_probes kernel/tracepoint.c:164 [inline]
tracepoint_add_func+0x618/0x9d0 kernel/tracepoint.c:386
tracepoint_probe_register_prio_may_exist+0x11e/0x190 kernel/tracepoint.c:482
bpf_raw_tp_link_attach+0x456/0x6b0 kernel/bpf/syscall.c:3372
bpf_raw_tracepoint_open+0x196/0x210 kernel/bpf/syscall.c:3399
__sys_bpf+0x4a7/0x6c0 kernel/bpf/syscall.c:5047
__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:0x7f244e67dda9
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:00007f244f3610c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f244e7abf80 RCX: 00007f244e67dda9
RDX: 0000000000000010 RSI: 0000000020000540 RDI: 0000000000000011
RBP: 00007f244e6ca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f244e7abf80 R15: 00007ffced3cade8
----------------
Code disassembly (best guess):
0: 4f 10 4d 89 rex.WRXB adc %r9b,-0x77(%r13)
4: cf iret
5: 49 c1 ef 03 shr $0x3,%r15
9: 41 0f b6 04 17 movzbl (%r15,%rdx,1),%eax
e: 84 c0 test %al,%al
10: 0f 85 02 01 00 00 jne 0x118
16: 44 8b 43 10 mov 0x10(%rbx),%r8d
1a: 48 8d 6b 08 lea 0x8(%rbx),%rbp
1e: 49 89 ec mov %rbp,%r12
21: 49 c1 ec 03 shr $0x3,%r12
25: 41 0f b6 04 14 movzbl (%r12,%rdx,1),%eax
* 2a: 84 c0 test %al,%al <-- trapping instruction
2c: 0f 85 16 01 00 00 jne 0x148
32: 44 3b 45 00 cmp 0x0(%rbp),%r8d
36: 73 3c jae 0x74
38: 48 8d 7b 0c lea 0xc(%rbx),%rdi
3c: 49 89 fd mov %rdi,%r13
3f: 49 rex.WB