============================================ WARNING: possible recursive locking detected 6.1.92-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/4301 is trying to acquire lock: ffff88805ae16240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff88805ae16240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 but task is already holding lock: ffff8880767f4240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff8880767f4240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 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 8 locks held by syz-executor.4/4301: #0: ffff888017b7a5e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ba/0x360 fs/file.c:1062 #1: ffff88814c452460 (sb_writers#4){.+.+}-{0:0}, at: vfs_write+0x269/0xba0 fs/read_write.c:580 #2: ffff88814c454b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_writepages+0x1e5/0x3de0 fs/ext4/inode.c:2703 #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __blk_mq_run_hw_queue+0xaf/0x2e0 block/blk-mq.c:2206 #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run1+0xec/0x3d0 kernel/trace/bpf_trace.c:2311 #5: ffff8880767f4240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] #5: ffff8880767f4240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 #6: ffff888077e36290 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #6: ffff888077e36290 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline] #6: ffff888077e36290 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182 #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 0 PID: 4301 Comm: syz-executor.4 Not tainted 6.1.92-syzkaller #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+0x1e3/0x2cb lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline] check_deadlock kernel/locking/lockdep.c:3026 [inline] validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812 __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:419 [inline] sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 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_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:94 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0xf6/0x190 mm/slab_common.c:994 sk_psock_free_link include/linux/skmsg.h:416 [inline] sock_map_del_link net/core/sock_map.c:160 [inline] sock_map_unref+0x3ac/0x5d0 net/core/sock_map.c:182 __sock_map_delete net/core/sock_map.c:425 [inline] sock_map_delete_elem+0x191/0x230 net/core/sock_map.c:451 bpf_prog_8a405b5ced52e191+0x42/0x46 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 trace_scsi_dispatch_cmd_start include/trace/events/scsi.h:156 [inline] scsi_dispatch_cmd drivers/scsi/scsi_lib.c:1526 [inline] scsi_queue_rq+0x2fce/0x31f0 drivers/scsi/scsi_lib.c:1764 blk_mq_dispatch_rq_list+0x1001/0x23c0 block/blk-mq.c:2087 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:172 [inline] blk_mq_do_dispatch_sched+0x8be/0xf10 block/blk-mq-sched.c:186 __blk_mq_sched_dispatch_requests+0x39b/0x490 blk_mq_sched_dispatch_requests+0xef/0x160 block/blk-mq-sched.c:338 __blk_mq_run_hw_queue+0x230/0x2e0 block/blk-mq.c:2206 blk_mq_sched_insert_requests+0x5cb/0x890 block/blk-mq-sched.c:492 blk_mq_dispatch_plug_list block/blk-mq.c:2791 [inline] blk_mq_flush_plug_list+0xa4a/0xb40 block/blk-mq.c:2840 __blk_flush_plug+0x442/0x4c0 block/blk-core.c:1152 blk_finish_plug+0x59/0x80 block/blk-core.c:1176 ext4_writepages+0x3620/0x3de0 fs/ext4/inode.c:2894 do_writepages+0x3a2/0x670 mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0x121/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] file_write_and_wait_range+0x1ca/0x2b0 mm/filemap.c:774 ext4_sync_file+0x249/0xcc0 fs/ext4/fsync.c:151 generic_write_sync include/linux/fs.h:2957 [inline] ext4_buffered_write_iter+0x30a/0x3a0 fs/ext4/file.c:292 ext4_file_write_iter+0x1d2/0x1880 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fe4e527cee9 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:00007fe4e5fac0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fe4e53b3f80 RCX: 00007fe4e527cee9 RDX: 0000000000000012 RSI: 0000000020000980 RDI: 0000000000000004 RBP: 00007fe4e52c947f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe4e53b3f80 R15: 00007ffdc7446488