===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 5.15.0-rc4-next-20211007-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.2/16023 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffff8b80a098 (tasklist_lock){.+.+}-{2:2}, at: send_sigio+0xab/0x380 fs/fcntl.c:810 and this task is already holding: ffff888079032138 (&f->f_owner.lock){.-.-}-{2:2}, at: send_sigio+0x24/0x380 fs/fcntl.c:796 which would create a new lock dependency: (&f->f_owner.lock){.-.-}-{2:2} -> (tasklist_lock){.+.+}-{2:2} but this new dependency connects a SOFTIRQ-irq-safe lock: (&timer->lock){..-.}-{2:2} ... which became SOFTIRQ-irq-safe at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 snd_timer_notify sound/core/timer.c:1087 [inline] snd_timer_notify+0x10c/0x3d0 sound/core/timer.c:1074 snd_pcm_timer_notify sound/core/pcm_native.c:595 [inline] snd_pcm_post_stop+0x195/0x1f0 sound/core/pcm_native.c:1453 snd_pcm_action_single sound/core/pcm_native.c:1229 [inline] snd_pcm_drain_done+0xdc/0x120 sound/core/pcm_native.c:1491 snd_pcm_update_state+0x43b/0x540 sound/core/pcm_lib.c:190 snd_pcm_update_hw_ptr0+0xa75/0x1a50 sound/core/pcm_lib.c:464 snd_pcm_period_elapsed_under_stream_lock+0x15a/0x230 sound/core/pcm_lib.c:1816 snd_pcm_period_elapsed+0x28/0x50 sound/core/pcm_lib.c:1848 dummy_hrtimer_callback+0x94/0x1b0 sound/drivers/dummy.c:377 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749 hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1766 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 on_stack arch/x86/include/asm/stacktrace.h:60 [inline] stack_access_ok arch/x86/kernel/unwind_orc.c:342 [inline] deref_stack_reg+0x99/0x150 arch/x86/kernel/unwind_orc.c:352 unwind_next_frame+0x13b9/0x1ca0 arch/x86/kernel/unwind_orc.c:600 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122 save_stack+0x151/0x1e0 mm/page_owner.c:119 __reset_page_owner+0x5d/0x170 mm/page_owner.c:140 reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1336 [inline] free_pcp_prepare+0x373/0x870 mm/page_alloc.c:1387 free_unref_page_prepare mm/page_alloc.c:3307 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3386 __vunmap+0x781/0xb70 mm/vmalloc.c:2625 __vfree+0x3c/0xd0 mm/vmalloc.c:2673 vfree+0x5a/0x90 mm/vmalloc.c:2704 __do_replace+0x16b/0x870 net/ipv4/netfilter/ip_tables.c:1099 do_replace net/ipv4/netfilter/ip_tables.c:1139 [inline] do_ipt_set_ctl+0x901/0xb80 net/ipv4/netfilter/ip_tables.c:1629 nf_setsockopt+0x83/0xe0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x3c3/0x3a60 net/ipv4/ip_sockglue.c:1435 tcp_setsockopt+0x136/0x2520 net/ipv4/tcp.c:3631 __sys_setsockopt+0x2db/0x610 net/socket.c:2176 __do_sys_setsockopt net/socket.c:2187 [inline] __se_sys_setsockopt net/socket.c:2184 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2184 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae to a SOFTIRQ-irq-unsafe lock: (tasklist_lock){.+.+}-{2:2} ... which became SOFTIRQ-irq-unsafe at: ... lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228 do_wait+0x284/0xce0 kernel/exit.c:1505 kernel_wait+0x9c/0x150 kernel/exit.c:1695 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 other info that might help us debug this: Chain exists of: &timer->lock --> &f->f_owner.lock --> tasklist_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(tasklist_lock); local_irq_disable(); lock(&timer->lock); lock(&f->f_owner.lock); lock(&timer->lock); *** DEADLOCK *** 5 locks held by syz-executor.2/16023: #0: ffffffff8bb813a0 (rcu_read_lock){....}-{1:2}, at: sock_def_readable+0x0/0x4e0 include/trace/events/sock.h:204 #1: ffffffff8bb813a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_unlock include/linux/rcupdate.h:723 [inline] #1: ffffffff8bb813a0 (rcu_read_lock){....}-{1:2}, at: sock_def_readable+0x2aa/0x4e0 net/core/sock.c:3126 #2: ffffffff8bb813a0 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x41/0x470 fs/fcntl.c:1033 #3: ffff88804327fb40 (&new->fa_lock){.-..}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1014 [inline] #3: ffff88804327fb40 (&new->fa_lock){.-..}-{2:2}, at: kill_fasync fs/fcntl.c:1035 [inline] #3: ffff88804327fb40 (&new->fa_lock){.-..}-{2:2}, at: kill_fasync+0x136/0x470 fs/fcntl.c:1028 #4: ffff888079032138 (&f->f_owner.lock){.-.-}-{2:2}, at: send_sigio+0x24/0x380 fs/fcntl.c:796 the dependencies between SOFTIRQ-irq-safe lock and the holding lock: -> (&timer->lock){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 snd_timer_notify sound/core/timer.c:1087 [inline] snd_timer_notify+0x10c/0x3d0 sound/core/timer.c:1074 snd_pcm_timer_notify sound/core/pcm_native.c:595 [inline] snd_pcm_post_stop+0x195/0x1f0 sound/core/pcm_native.c:1453 snd_pcm_action_single sound/core/pcm_native.c:1229 [inline] snd_pcm_drain_done+0xdc/0x120 sound/core/pcm_native.c:1491 snd_pcm_update_state+0x43b/0x540 sound/core/pcm_lib.c:190 snd_pcm_update_hw_ptr0+0xa75/0x1a50 sound/core/pcm_lib.c:464 snd_pcm_period_elapsed_under_stream_lock+0x15a/0x230 sound/core/pcm_lib.c:1816 snd_pcm_period_elapsed+0x28/0x50 sound/core/pcm_lib.c:1848 dummy_hrtimer_callback+0x94/0x1b0 sound/drivers/dummy.c:377 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749 hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1766 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 on_stack arch/x86/include/asm/stacktrace.h:60 [inline] stack_access_ok arch/x86/kernel/unwind_orc.c:342 [inline] deref_stack_reg+0x99/0x150 arch/x86/kernel/unwind_orc.c:352 unwind_next_frame+0x13b9/0x1ca0 arch/x86/kernel/unwind_orc.c:600 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122 save_stack+0x151/0x1e0 mm/page_owner.c:119 __reset_page_owner+0x5d/0x170 mm/page_owner.c:140 reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1336 [inline] free_pcp_prepare+0x373/0x870 mm/page_alloc.c:1387 free_unref_page_prepare mm/page_alloc.c:3307 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3386 __vunmap+0x781/0xb70 mm/vmalloc.c:2625 __vfree+0x3c/0xd0 mm/vmalloc.c:2673 vfree+0x5a/0x90 mm/vmalloc.c:2704 __do_replace+0x16b/0x870 net/ipv4/netfilter/ip_tables.c:1099 do_replace net/ipv4/netfilter/ip_tables.c:1139 [inline] do_ipt_set_ctl+0x901/0xb80 net/ipv4/netfilter/ip_tables.c:1629 nf_setsockopt+0x83/0xe0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x3c3/0x3a60 net/ipv4/ip_sockglue.c:1435 tcp_setsockopt+0x136/0x2520 net/ipv4/tcp.c:3631 __sys_setsockopt+0x2db/0x610 net/socket.c:2176 __do_sys_setsockopt net/socket.c:2187 [inline] __se_sys_setsockopt net/socket.c:2184 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2184 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 snd_timer_notify sound/core/timer.c:1087 [inline] snd_timer_notify+0x10c/0x3d0 sound/core/timer.c:1074 snd_pcm_timer_notify sound/core/pcm_native.c:595 [inline] snd_pcm_post_stop+0x195/0x1f0 sound/core/pcm_native.c:1453 snd_pcm_action_single sound/core/pcm_native.c:1229 [inline] snd_pcm_action+0x143/0x170 sound/core/pcm_native.c:1310 snd_pcm_stop sound/core/pcm_native.c:1476 [inline] snd_pcm_drop+0x1ab/0x320 sound/core/pcm_native.c:2155 snd_pcm_kernel_ioctl+0x12f/0x240 sound/core/pcm_native.c:3367 snd_pcm_oss_sync+0x230/0x800 sound/core/oss/pcm_oss.c:1721 snd_pcm_oss_release+0x276/0x300 sound/core/oss/pcm_oss.c:2571 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae } ... key at: [] __key.12+0x0/0x40 -> (&new->fa_lock){.-..}-{2:2} { IN-HARDIRQ-R at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:1014 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x136/0x470 fs/fcntl.c:1028 perf_event_wakeup kernel/events/core.c:6434 [inline] perf_pending_event+0x432/0x560 kernel/events/core.c:6517 irq_work_single+0x120/0x1f0 kernel/irq_work.c:155 irq_work_run_list+0x91/0xc0 kernel/irq_work.c:177 irq_work_run+0x54/0xd0 kernel/irq_work.c:186 __sysvec_irq_work+0x95/0x3d0 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x12/0x20 arch/x86/include/asm/idtentry.h:664 native_apic_mem_write arch/x86/include/asm/apic.h:107 [inline] __default_send_IPI_shortcut arch/x86/kernel/apic/ipi.c:139 [inline] default_send_IPI_self+0x5d/0xe0 arch/x86/kernel/apic/ipi.c:242 arch_irq_work_raise+0x92/0x110 arch/x86/kernel/irq_work.c:31 __irq_work_queue_local kernel/irq_work.c:59 [inline] __irq_work_queue_local+0x133/0x190 kernel/irq_work.c:53 irq_work_queue kernel/irq_work.c:75 [inline] irq_work_queue+0x47/0x80 kernel/irq_work.c:67 __perf_event_overflow+0x239/0x3d0 kernel/events/core.c:9181 perf_swevent_overflow kernel/events/core.c:9253 [inline] perf_swevent_event+0x4b9/0x550 kernel/events/core.c:9291 do_perf_sw_event kernel/events/core.c:9394 [inline] ___perf_sw_event+0x31a/0x570 kernel/events/core.c:9425 __perf_sw_event+0x54/0x130 kernel/events/core.c:9437 perf_sw_event include/linux/perf_event.h:1174 [inline] do_user_addr_fault+0x5ea/0x11c0 arch/x86/mm/fault.c:1301 handle_page_fault arch/x86/mm/fault.c:1485 [inline] exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1541 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568 copy_user_enhanced_fast_string+0xe/0x30 arch/x86/lib/copy_user_64.S:205 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline] copyin.part.0+0xe4/0x110 lib/iov_iter.c:168 copyin lib/iov_iter.c:720 [inline] _copy_from_iter+0x2a3/0x1320 lib/iov_iter.c:720 copy_from_iter include/linux/uio.h:162 [inline] copy_from_iter_full include/linux/uio.h:168 [inline] skb_do_copy_data_nocache+0x145/0x310 include/net/sock.h:2135 skb_copy_to_page_nocache include/net/sock.h:2161 [inline] tcp_sendmsg_locked+0x1239/0x2f90 net/ipv4/tcp.c:1343 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1443 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:817 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 __sys_sendto+0x21c/0x320 net/socket.c:2036 __do_sys_sendto net/socket.c:2048 [inline] __se_sys_sendto net/socket.c:2044 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2044 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:316 fasync_remove_entry+0xb6/0x1f0 fs/fcntl.c:891 fasync_helper+0x9e/0xb0 fs/fcntl.c:994 __tty_fasync drivers/tty/tty_io.c:2241 [inline] tty_fasync+0x17b/0x390 drivers/tty/tty_io.c:2274 __fput+0x846/0x9f0 fs/file_table.c:277 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:1014 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x136/0x470 fs/fcntl.c:1028 snd_timer_user_ccallback+0x298/0x330 sound/core/timer.c:1387 snd_timer_notify1+0x11c/0x3b0 sound/core/timer.c:516 snd_timer_start1+0x4d4/0x800 sound/core/timer.c:578 snd_timer_start sound/core/timer.c:697 [inline] snd_timer_start sound/core/timer.c:690 [inline] snd_timer_user_start.isra.0+0x1e3/0x260 sound/core/timer.c:1985 __snd_timer_user_ioctl.isra.0+0xda8/0x2490 sound/core/timer.c:2108 snd_timer_user_ioctl+0x77/0xb0 sound/core/timer.c:2129 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae } ... key at: [] __key.0+0x0/0x40 ... acquired at: __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:1014 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x136/0x470 fs/fcntl.c:1028 snd_timer_user_ccallback+0x298/0x330 sound/core/timer.c:1387 snd_timer_notify1+0x11c/0x3b0 sound/core/timer.c:516 snd_timer_start1+0x4d4/0x800 sound/core/timer.c:578 snd_timer_start sound/core/timer.c:697 [inline] snd_timer_start sound/core/timer.c:690 [inline] snd_timer_user_start.isra.0+0x1e3/0x260 sound/core/timer.c:1985 __snd_timer_user_ioctl.isra.0+0xda8/0x2490 sound/core/timer.c:2108 snd_timer_user_ioctl+0x77/0xb0 sound/core/timer.c:2129 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> (&f->f_owner.lock){.-.-}-{2:2} { IN-HARDIRQ-R at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236 send_sigio+0x24/0x380 fs/fcntl.c:796 kill_fasync_rcu fs/fcntl.c:1021 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x1f8/0x470 fs/fcntl.c:1028 perf_event_wakeup kernel/events/core.c:6434 [inline] perf_pending_event+0x432/0x560 kernel/events/core.c:6517 irq_work_single+0x120/0x1f0 kernel/irq_work.c:155 irq_work_run_list+0x91/0xc0 kernel/irq_work.c:177 irq_work_run+0x54/0xd0 kernel/irq_work.c:186 __sysvec_irq_work+0x95/0x3d0 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x12/0x20 arch/x86/include/asm/idtentry.h:664 native_apic_mem_write arch/x86/include/asm/apic.h:107 [inline] __default_send_IPI_shortcut arch/x86/kernel/apic/ipi.c:139 [inline] default_send_IPI_self+0x5d/0xe0 arch/x86/kernel/apic/ipi.c:242 arch_irq_work_raise+0x92/0x110 arch/x86/kernel/irq_work.c:31 __irq_work_queue_local kernel/irq_work.c:59 [inline] __irq_work_queue_local+0x133/0x190 kernel/irq_work.c:53 irq_work_queue kernel/irq_work.c:75 [inline] irq_work_queue+0x47/0x80 kernel/irq_work.c:67 __perf_event_overflow+0x239/0x3d0 kernel/events/core.c:9181 perf_swevent_overflow kernel/events/core.c:9253 [inline] perf_swevent_event+0x4b9/0x550 kernel/events/core.c:9291 do_perf_sw_event kernel/events/core.c:9394 [inline] ___perf_sw_event+0x31a/0x570 kernel/events/core.c:9425 __perf_sw_event+0x54/0x130 kernel/events/core.c:9437 perf_sw_event include/linux/perf_event.h:1174 [inline] do_user_addr_fault+0x5ea/0x11c0 arch/x86/mm/fault.c:1301 handle_page_fault arch/x86/mm/fault.c:1485 [inline] exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1541 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568 copy_user_enhanced_fast_string+0xe/0x30 arch/x86/lib/copy_user_64.S:205 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline] copyin.part.0+0xe4/0x110 lib/iov_iter.c:168 copyin lib/iov_iter.c:720 [inline] _copy_from_iter+0x2a3/0x1320 lib/iov_iter.c:720 copy_from_iter include/linux/uio.h:162 [inline] copy_from_iter_full include/linux/uio.h:168 [inline] skb_do_copy_data_nocache+0x145/0x310 include/net/sock.h:2135 skb_copy_to_page_nocache include/net/sock.h:2161 [inline] tcp_sendmsg_locked+0x1239/0x2f90 net/ipv4/tcp.c:1343 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1443 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:817 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 __sys_sendto+0x21c/0x320 net/socket.c:2036 __do_sys_sendto net/socket.c:2048 [inline] __se_sys_sendto net/socket.c:2044 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2044 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae IN-SOFTIRQ-R at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236 send_sigurg+0x1e/0xaf0 fs/fcntl.c:835 sk_send_sigurg+0x76/0x310 net/core/sock.c:3159 tcp_check_urg.isra.0+0x1f3/0x710 net/ipv4/tcp_input.c:5567 tcp_urg net/ipv4/tcp_input.c:5608 [inline] tcp_rcv_established+0x12ab/0x2130 net/ipv4/tcp_input.c:5942 tcp_v6_do_rcv+0x41d/0x12b0 net/ipv6/tcp_ipv6.c:1517 tcp_v6_rcv+0x23dc/0x2ca0 net/ipv6/tcp_ipv6.c:1756 ip6_protocol_deliver_rcu+0x2e9/0x1ca0 net/ipv6/ip6_input.c:422 ip6_input_finish+0x62/0x170 net/ipv6/ip6_input.c:463 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_input+0x9c/0xd0 net/ipv6/ip6_input.c:472 dst_input include/net/dst.h:460 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:76 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ipv6_rcv+0x28c/0x3c0 net/ipv6/ip6_input.c:297 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5438 __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5552 process_backlog+0x2a5/0x6c0 net/core/dev.c:6428 __napi_poll+0xaf/0x440 net/core/dev.c:6993 napi_poll net/core/dev.c:7060 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7147 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 run_ksoftirqd kernel/softirq.c:921 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:913 smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:316 f_modown+0x2a/0x390 fs/fcntl.c:91 __f_setown fs/fcntl.c:110 [inline] f_setown+0xd7/0x230 fs/fcntl.c:138 do_fcntl+0x749/0x1210 fs/fcntl.c:393 __do_sys_fcntl fs/fcntl.c:472 [inline] __se_sys_fcntl fs/fcntl.c:457 [inline] __x64_sys_fcntl+0x165/0x1e0 fs/fcntl.c:457 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236 send_sigurg+0x1e/0xaf0 fs/fcntl.c:835 sk_send_sigurg+0x76/0x310 net/core/sock.c:3159 tcp_check_urg.isra.0+0x1f3/0x710 net/ipv4/tcp_input.c:5567 tcp_urg net/ipv4/tcp_input.c:5608 [inline] tcp_rcv_established+0x12ab/0x2130 net/ipv4/tcp_input.c:5942 tcp_v6_do_rcv+0x41d/0x12b0 net/ipv6/tcp_ipv6.c:1517 tcp_v6_rcv+0x23dc/0x2ca0 net/ipv6/tcp_ipv6.c:1756 ip6_protocol_deliver_rcu+0x2e9/0x1ca0 net/ipv6/ip6_input.c:422 ip6_input_finish+0x62/0x170 net/ipv6/ip6_input.c:463 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_input+0x9c/0xd0 net/ipv6/ip6_input.c:472 dst_input include/net/dst.h:460 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:76 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ipv6_rcv+0x28c/0x3c0 net/ipv6/ip6_input.c:297 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5438 __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5552 process_backlog+0x2a5/0x6c0 net/core/dev.c:6428 __napi_poll+0xaf/0x440 net/core/dev.c:6993 napi_poll net/core/dev.c:7060 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7147 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 run_ksoftirqd kernel/softirq.c:921 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:913 smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 } ... key at: [] __key.5+0x0/0x40 ... acquired at: __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236 send_sigio+0x24/0x380 fs/fcntl.c:796 kill_fasync_rcu fs/fcntl.c:1021 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x1f8/0x470 fs/fcntl.c:1028 snd_timer_user_ccallback+0x298/0x330 sound/core/timer.c:1387 snd_timer_notify1+0x11c/0x3b0 sound/core/timer.c:516 snd_timer_start1+0x4d4/0x800 sound/core/timer.c:578 snd_timer_start sound/core/timer.c:697 [inline] snd_timer_start sound/core/timer.c:690 [inline] snd_timer_user_start.isra.0+0x1e3/0x260 sound/core/timer.c:1985 __snd_timer_user_ioctl.isra.0+0xda8/0x2490 sound/core/timer.c:2108 snd_timer_user_ioctl+0x77/0xb0 sound/core/timer.c:2129 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock: -> (tasklist_lock){.+.+}-{2:2} { HARDIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228 do_wait+0x284/0xce0 kernel/exit.c:1505 kernel_wait+0x9c/0x150 kernel/exit.c:1695 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 SOFTIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228 do_wait+0x284/0xce0 kernel/exit.c:1505 kernel_wait+0x9c/0x150 kernel/exit.c:1695 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:316 copy_process+0x36c0/0x7580 kernel/fork.c:2363 kernel_clone+0xe7/0xab0 kernel/fork.c:2634 kernel_thread+0xb5/0xf0 kernel/fork.c:2686 rest_init+0x23/0x3e0 init/main.c:699 start_kernel+0x47a/0x49b init/main.c:1143 secondary_startup_64_no_verify+0xb0/0xbb INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228 do_wait+0x284/0xce0 kernel/exit.c:1505 kernel_wait+0x9c/0x150 kernel/exit.c:1695 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 } ... key at: [] tasklist_lock+0x18/0x40 ... acquired at: lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228 send_sigio+0xab/0x380 fs/fcntl.c:810 kill_fasync_rcu fs/fcntl.c:1021 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x1f8/0x470 fs/fcntl.c:1028 sock_wake_async+0xd2/0x160 net/socket.c:1368 sk_wake_async include/net/sock.h:2390 [inline] sk_wake_async include/net/sock.h:2386 [inline] sock_def_readable+0x349/0x4e0 net/core/sock.c:3125 unix_dgram_sendmsg+0xfa7/0x1950 net/unix/af_unix.c:1941 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x331/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmmsg+0x195/0x470 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae stack backtrace: CPU: 0 PID: 16023 Comm: syz-executor.2 Not tainted 5.15.0-rc4-next-20211007-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_bad_irq_dependency kernel/locking/lockdep.c:2577 [inline] check_irq_usage.cold+0x4c1/0x6b0 kernel/locking/lockdep.c:2816 check_prev_add kernel/locking/lockdep.c:3067 [inline] check_prevs_add kernel/locking/lockdep.c:3186 [inline] validate_chain kernel/locking/lockdep.c:3801 [inline] __lock_acquire+0x2a1f/0x54a0 kernel/locking/lockdep.c:5027 lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228 send_sigio+0xab/0x380 fs/fcntl.c:810 kill_fasync_rcu fs/fcntl.c:1021 [inline] kill_fasync fs/fcntl.c:1035 [inline] kill_fasync+0x1f8/0x470 fs/fcntl.c:1028 sock_wake_async+0xd2/0x160 net/socket.c:1368 sk_wake_async include/net/sock.h:2390 [inline] sk_wake_async include/net/sock.h:2386 [inline] sock_def_readable+0x349/0x4e0 net/core/sock.c:3125 unix_dgram_sendmsg+0xfa7/0x1950 net/unix/af_unix.c:1941 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x331/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmmsg+0x195/0x470 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f01e9d4e8d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f01e72c5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f01e9e52f60 RCX: 00007f01e9d4e8d9 RDX: 0307017fdb7a66cb RSI: 0000000020002dc0 RDI: 0000000000000006 RBP: 00007f01e9da8cb4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000003ec0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe4e6c439f R14: 00007f01e72c5300 R15: 0000000000022000