===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.1.84-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.4/17298 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire: ffff88804a866240 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:416 [inline] ffff88804a866240 (&stab->lock){+...}-{2:2}, at: sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 and this task is already holding: ffff888021be8958 (&sighand->siglock){-.-.}-{2:2}, at: force_sig_info_to_task+0x69/0x470 kernel/signal.c:1333 which would create a new lock dependency: (&sighand->siglock){-.-.}-{2:2} -> (&stab->lock){+...}-{2:2} but this new dependency connects a HARDIRQ-irq-safe lock: (&sighand->siglock){-.-.}-{2:2} ... which became HARDIRQ-irq-safe at: 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 __lock_task_sighand+0x145/0x2d0 kernel/signal.c:1410 lock_task_sighand include/linux/sched/signal.h:745 [inline] do_send_sig_info kernel/signal.c:1299 [inline] group_send_sig_info+0x26c/0x300 kernel/signal.c:1448 do_bpf_send_signal+0x81/0x150 kernel/trace/bpf_trace.c:839 irq_work_single+0xd5/0x230 kernel/irq_work.c:211 irq_work_run_list kernel/irq_work.c:242 [inline] irq_work_run+0x187/0x350 kernel/irq_work.c:251 __sysvec_irq_work+0xbb/0x360 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x89/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x16/0x20 arch/x86/include/asm/idtentry.h:679 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:401 [inline] memcg_destroy_list_lru mm/list_lru.c:387 [inline] list_lru_destroy+0x751/0x840 mm/list_lru.c:597 deactivate_locked_super+0xac/0x110 fs/super.c:339 v9fs_mount+0xa05/0xc30 fs/9p/vfs_super.c:207 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1562 do_new_mount+0x2ba/0xb40 fs/namespace.c:3051 do_mount fs/namespace.c:3394 [inline] __do_sys_mount fs/namespace.c:3602 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3579 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 to a HARDIRQ-irq-unsafe lock: (&stab->lock){+...}-{2:2} ... which became HARDIRQ-irq-unsafe at: ... 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:416 [inline] sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 bpf_prog_2c29ac5cdc6b1842+0x2e/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_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313 __traceiter_ext4_da_write_pages+0x73/0xc0 include/trace/events/ext4.h:472 trace_ext4_da_write_pages include/trace/events/ext4.h:472 [inline] ext4_writepages+0x3409/0x3de0 fs/ext4/inode.c:2840 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+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&stab->lock); local_irq_disable(); lock(&sighand->siglock); lock(&stab->lock); lock(&sighand->siglock); *** DEADLOCK *** 2 locks held by syz-executor.4/17298: #0: ffff888021be8958 (&sighand->siglock){-.-.}-{2:2}, at: force_sig_info_to_task+0x69/0x470 kernel/signal.c:1333 #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run5+0x193/0x490 kernel/trace/bpf_trace.c:2315 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> (&sighand->siglock){-.-.}-{2:2} { IN-HARDIRQ-W at: 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 __lock_task_sighand+0x145/0x2d0 kernel/signal.c:1410 lock_task_sighand include/linux/sched/signal.h:745 [inline] do_send_sig_info kernel/signal.c:1299 [inline] group_send_sig_info+0x26c/0x300 kernel/signal.c:1448 do_bpf_send_signal+0x81/0x150 kernel/trace/bpf_trace.c:839 irq_work_single+0xd5/0x230 kernel/irq_work.c:211 irq_work_run_list kernel/irq_work.c:242 [inline] irq_work_run+0x187/0x350 kernel/irq_work.c:251 __sysvec_irq_work+0xbb/0x360 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x89/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x16/0x20 arch/x86/include/asm/idtentry.h:679 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:401 [inline] memcg_destroy_list_lru mm/list_lru.c:387 [inline] list_lru_destroy+0x751/0x840 mm/list_lru.c:597 deactivate_locked_super+0xac/0x110 fs/super.c:339 v9fs_mount+0xa05/0xc30 fs/9p/vfs_super.c:207 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1562 do_new_mount+0x2ba/0xb40 fs/namespace.c:3051 do_mount fs/namespace.c:3394 [inline] __do_sys_mount fs/namespace.c:3602 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3579 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 IN-SOFTIRQ-W at: 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 __lock_task_sighand+0x145/0x2d0 kernel/signal.c:1410 lock_task_sighand include/linux/sched/signal.h:745 [inline] do_send_sig_info kernel/signal.c:1299 [inline] group_send_sig_info+0x26c/0x300 kernel/signal.c:1448 bpf_send_signal_common+0x2d8/0x420 kernel/trace/bpf_trace.c:882 ____bpf_send_signal kernel/trace/bpf_trace.c:887 [inline] bpf_send_signal+0x15/0x20 kernel/trace/bpf_trace.c:885 0xffffffffa0000966 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 skb_free_head net/core/skbuff.c:762 [inline] skb_release_data+0x5de/0x7a0 net/core/skbuff.c:791 skb_release_all net/core/skbuff.c:856 [inline] napi_consume_skb+0x12f/0x1d0 net/core/skbuff.c:1113 free_old_xmit_skbs+0x122/0x2c0 drivers/net/virtio_net.c:1609 virtnet_poll_tx+0x210/0x550 drivers/net/virtio_net.c:1781 __napi_poll+0xc7/0x470 net/core/dev.c:6537 napi_poll net/core/dev.c:6604 [inline] net_rx_action+0x70f/0xeb0 net/core/dev.c:6718 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 try_to_wake_up+0x7dd/0x12e0 kernel/sched/core.c:4230 wake_up_process kernel/sched/core.c:4362 [inline] wake_up_q+0x8b/0xd0 kernel/sched/core.c:1007 futex_wake+0x4ea/0x590 kernel/futex/waitwake.c:184 do_futex+0x375/0x490 kernel/futex/syscalls.c:111 __do_sys_futex kernel/futex/syscalls.c:183 [inline] __se_sys_futex+0x3d7/0x460 kernel/futex/syscalls.c:164 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 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:376 [inline] calculate_sigpending+0x4a/0x80 kernel/signal.c:195 ret_from_fork+0x8/0x30 arch/x86/entry/entry_64.S:292 } ... key at: [] sighand_ctor.__key+0x0/0x20 the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock: -> (&stab->lock){+...}-{2:2} { HARDIRQ-ON-W at: 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:416 [inline] sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 bpf_prog_2c29ac5cdc6b1842+0x2e/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_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313 __traceiter_ext4_da_write_pages+0x73/0xc0 include/trace/events/ext4.h:472 trace_ext4_da_write_pages include/trace/events/ext4.h:472 [inline] ext4_writepages+0x3409/0x3de0 fs/ext4/inode.c:2840 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+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd INITIAL USE at: 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:416 [inline] sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448 bpf_prog_2c29ac5cdc6b1842+0x2e/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_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313 __traceiter_ext4_da_write_pages+0x73/0xc0 include/trace/events/ext4.h:472 trace_ext4_da_write_pages include/trace/events/ext4.h:472 [inline] ext4_writepages+0x3409/0x3de0 fs/ext4/inode.c:2840 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+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd } ... key at: [] sock_map_alloc.__key+0x0/0x20 ... acquired at: 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:416 [inline] sock_map_delete_elem+0x97/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:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run5+0x27b/0x490 kernel/trace/bpf_trace.c:2315 trace_signal_generate+0x201/0x290 include/trace/events/signal.h:50 __send_signal_locked+0xb43/0xdc0 kernel/signal.c:1196 force_sig_info_to_task+0x327/0x470 kernel/signal.c:1353 force_sig_info kernel/signal.c:1361 [inline] force_sig+0x114/0x1d0 kernel/signal.c:1664 gp_user_force_sig_segv arch/x86/kernel/traps.c:726 [inline] __exc_general_protection arch/x86/kernel/traps.c:759 [inline] exc_general_protection+0x1a3/0x590 arch/x86/kernel/traps.c:729 asm_exc_general_protection+0x22/0x30 arch/x86/include/asm/idtentry.h:564 stack backtrace: CPU: 1 PID: 17298 Comm: syz-executor.4 Not tainted 6.1.84-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 print_bad_irq_dependency kernel/locking/lockdep.c:2604 [inline] check_irq_usage kernel/locking/lockdep.c:2843 [inline] check_prev_add kernel/locking/lockdep.c:3094 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain+0x4d16/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_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:416 [inline] sock_map_delete_elem+0x97/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:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run5+0x27b/0x490 kernel/trace/bpf_trace.c:2315 trace_signal_generate+0x201/0x290 include/trace/events/signal.h:50 __send_signal_locked+0xb43/0xdc0 kernel/signal.c:1196 force_sig_info_to_task+0x327/0x470 kernel/signal.c:1353 force_sig_info kernel/signal.c:1361 [inline] force_sig+0x114/0x1d0 kernel/signal.c:1664 gp_user_force_sig_segv arch/x86/kernel/traps.c:726 [inline] __exc_general_protection arch/x86/kernel/traps.c:759 [inline] exc_general_protection+0x1a3/0x590 arch/x86/kernel/traps.c:729 asm_exc_general_protection+0x22/0x30 arch/x86/include/asm/idtentry.h:564 RIP: 0033:0x7f45e366fcf9 Code: f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 89 f8 48 89 fa c5 f9 ef c0 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 27 01 00 00 fd 74 0f c5 fd d7 c1 85 c0 74 5b f3 0f bc c0 e9 30 01 00 00 66 RSP: 002b:00007f45e435a858 EFLAGS: 00010283 RAX: 0000000000000999 RBX: 00007f45e435adc0 RCX: 00007f45e3775bc0 RDX: 9999999999999999 RSI: 00007f45e36c9062 RDI: 9999999999999999 RBP: 000000000000000b R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000000 R12: 0000000000000073 R13: 00007f45e435af40 R14: 9999999999999999 R15: 0000000000000000