============================================ WARNING: possible recursive locking detected 6.9.0-syzkaller-g6f130e4d4a5f #0 Not tainted -------------------------------------------- strace-static-x/5090 is trying to acquire lock: ffff88807e201220 (&stab->lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff88807e201220 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:429 [inline] ffff88807e201220 (&stab->lock){+...}-{2:2}, at: sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:461 but task is already holding lock: ffff88807e201a20 (&stab->lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff88807e201a20 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:429 [inline] ffff88807e201a20 (&stab->lock){+...}-{2:2}, at: sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:461 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&stab->lock); lock(&stab->lock); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by strace-static-x/5090: #0: ffffffff8e9b82f0 (tomoyo_ss){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #0: ffffffff8e9b82f0 (tomoyo_ss){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #0: ffffffff8e9b82f0 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_read_lock security/tomoyo/common.h:1108 [inline] #0: ffffffff8e9b82f0 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_path_number_perm+0x208/0x880 security/tomoyo/file.c:722 #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444 #2: ffff88807e201a20 (&stab->lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #2: ffff88807e201a20 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:429 [inline] #2: ffff88807e201a20 (&stab->lock){+...}-{2:2}, at: sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:461 #3: ffff8880231e82b0 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #3: ffff8880231e82b0 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:157 [inline] #3: ffff8880231e82b0 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5e0 net/core/sock_map.c:192 #4: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #4: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444 stack backtrace: CPU: 1 PID: 5090 Comm: strace-static-x Not tainted 6.9.0-syzkaller-g6f130e4d4a5f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] __sock_map_delete net/core/sock_map.c:429 [inline] sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:461 bpf_prog_2c29ac5cdc6b1842+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444 __traceiter_kfree+0x2b/0x50 include/trace/events/kmem.h:94 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0x2bd/0x3b0 mm/slub.c:4450 sk_psock_free_link include/linux/skmsg.h:425 [inline] sock_map_del_link net/core/sock_map.c:170 [inline] sock_map_unref+0x3ac/0x5e0 net/core/sock_map.c:192 __sock_map_delete net/core/sock_map.c:435 [inline] sock_map_delete_elem+0x1a2/0x250 net/core/sock_map.c:461 bpf_prog_2c29ac5cdc6b1842+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444 __traceiter_kfree+0x2b/0x50 include/trace/events/kmem.h:94 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0x2bd/0x3b0 mm/slub.c:4450 tomoyo_add_entry security/tomoyo/common.c:2037 [inline] tomoyo_supervisor+0xf4d/0x11f0 security/tomoyo/common.c:2095 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x5e8/0x880 security/tomoyo/file.c:734 security_file_ioctl+0x75/0xb0 security/security.c:2765 __do_sys_ioctl fs/ioctl.c:898 [inline] __se_sys_ioctl+0x47/0x170 fs/ioctl.c:890 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x4e963b Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1b 48 8b 44 24 18 64 48 2b 04 25 28 00 RSP: 002b:00007ffd60426300 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004e963b RDX: 00007ffd60426360 RSI: 0000000000008910 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd604263c0 R13: 00007ffd60426360 R14: 000000000aff9a30 R15: 000000000054fd62