====================================================== WARNING: possible circular locking dependency detected 6.9.0-rc7-syzkaller-00023-g6d7ddd805123 #0 Not tainted ------------------------------------------------------ syz-executor.3/27877 is trying to acquire lock: ffff8880379ba238 (&psock->ingress_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff8880379ba238 (&psock->ingress_lock){+...}-{2:2}, at: sk_psock_stop net/core/skmsg.c:802 [inline] ffff8880379ba238 (&psock->ingress_lock){+...}-{2:2}, at: sk_psock_drop+0x2fb/0x500 net/core/skmsg.c:846 but task is already holding lock: ffff888062ea2200 (&stab->lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff888062ea2200 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:417 [inline] ffff888062ea2200 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:449 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&stab->lock){+.-.}-{2:2}: 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:417 [inline] sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:449 0xffffffffa0000ef8 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run2+0x204/0x420 kernel/trace/bpf_trace.c:2420 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0x2bd/0x3b0 mm/slub.c:4383 sk_psock_cork_free include/linux/skmsg.h:430 [inline] sk_psock_stop+0xc5/0x110 net/core/skmsg.c:804 sock_map_close+0x1b2/0x2d0 net/core/sock_map.c:1651 inet_release+0x17d/0x200 net/ipv4/af_inet.c:437 __sock_release net/socket.c:659 [inline] sock_close+0xbc/0x240 net/socket.c:1421 __fput+0x429/0x8a0 fs/file_table.c:422 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1541 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 -> #0 (&psock->ingress_lock){+...}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __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] sk_psock_stop net/core/skmsg.c:802 [inline] sk_psock_drop+0x2fb/0x500 net/core/skmsg.c:846 __sock_map_delete net/core/sock_map.c:423 [inline] sock_map_delete_elem+0x1a2/0x250 net/core/sock_map.c:449 bpf_prog_8a405b5ced52e191+0x4a/0x4e bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run2+0x204/0x420 kernel/trace/bpf_trace.c:2420 trace_ext4_allocate_blocks include/trace/events/ext4.h:858 [inline] ext4_mb_new_blocks+0x4819/0x4bf0 fs/ext4/mballoc.c:6261 ext4_ext_map_blocks+0x1c74/0x77b0 fs/ext4/extents.c:4317 ext4_map_blocks+0xa5e/0x1d20 fs/ext4/inode.c:623 ext4_getblk+0x1fa/0x850 fs/ext4/inode.c:833 ext4_bread+0x2e/0x180 fs/ext4/inode.c:889 ext4_append+0x327/0x5c0 fs/ext4/namei.c:83 ext4_init_new_dir+0x33e/0xa30 fs/ext4/namei.c:2977 ext4_mkdir+0x4f7/0xcf0 fs/ext4/namei.c:3023 vfs_mkdir+0x2f9/0x4b0 fs/namei.c:4123 do_mkdirat+0x264/0x3a0 fs/namei.c:4146 __do_sys_mkdir fs/namei.c:4166 [inline] __se_sys_mkdir fs/namei.c:4164 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4164 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&stab->lock); lock(&psock->ingress_lock); lock(&stab->lock); lock(&psock->ingress_lock); *** DEADLOCK *** 6 locks held by syz-executor.3/27877: #0: ffff88807d05a420 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:409 #1: ffff88805e2c1800 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:830 [inline] #1: ffff88805e2c1800 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: filename_create+0x260/0x540 fs/namei.c:3892 #2: ffff88807d05e950 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x203f/0x22a0 fs/jbd2/transaction.c:463 #3: ffff888046636688 (&ei->i_data_sem){++++}-{3:3}, at: ext4_map_blocks+0x988/0x1d20 fs/ext4/inode.c:616 #4: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #4: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x114/0x420 kernel/trace/bpf_trace.c:2420 #5: ffff888062ea2200 (&stab->lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #5: ffff888062ea2200 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:417 [inline] #5: ffff888062ea2200 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x175/0x250 net/core/sock_map.c:449 stack backtrace: CPU: 1 PID: 27877 Comm: syz-executor.3 Not tainted 6.9.0-rc7-syzkaller-00023-g6d7ddd805123 #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_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __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] sk_psock_stop net/core/skmsg.c:802 [inline] sk_psock_drop+0x2fb/0x500 net/core/skmsg.c:846 __sock_map_delete net/core/sock_map.c:423 [inline] sock_map_delete_elem+0x1a2/0x250 net/core/sock_map.c:449 bpf_prog_8a405b5ced52e191+0x4a/0x4e bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run2+0x204/0x420 kernel/trace/bpf_trace.c:2420 trace_ext4_allocate_blocks include/trace/events/ext4.h:858 [inline] ext4_mb_new_blocks+0x4819/0x4bf0 fs/ext4/mballoc.c:6261 ext4_ext_map_blocks+0x1c74/0x77b0 fs/ext4/extents.c:4317 ext4_map_blocks+0xa5e/0x1d20 fs/ext4/inode.c:623 ext4_getblk+0x1fa/0x850 fs/ext4/inode.c:833 ext4_bread+0x2e/0x180 fs/ext4/inode.c:889 ext4_append+0x327/0x5c0 fs/ext4/namei.c:83 ext4_init_new_dir+0x33e/0xa30 fs/ext4/namei.c:2977 ext4_mkdir+0x4f7/0xcf0 fs/ext4/namei.c:3023 vfs_mkdir+0x2f9/0x4b0 fs/namei.c:4123 do_mkdirat+0x264/0x3a0 fs/namei.c:4146 __do_sys_mkdir fs/namei.c:4166 [inline] __se_sys_mkdir fs/namei.c:4164 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4164 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:0x7f771687dd69 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:00007f77175070c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f77169abf80 RCX: 00007f771687dd69 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200020c0 RBP: 00007f77168ca49e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f77169abf80 R15: 00007ffe8e4a4228 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 'syz-executor.3': attribute type 25 has an invalid length. netdevsim netdevsim3 netdevsim0: set [0, 0] type 1 family 0 port 8472 - 0 netdevsim netdevsim3 netdevsim1: set [0, 0] type 1 family 0 port 8472 - 0 netdevsim netdevsim3 netdevsim2: set [0, 0] type 1 family 0 port 8472 - 0 netdevsim netdevsim3 netdevsim3: set [0, 0] type 1 family 0 port 8472 - 0