======================================================== WARNING: possible irq lock inversion dependency detected 5.14.0-syzkaller #0 Not tainted -------------------------------------------------------- syz-executor.0/31021 just changed the state of lock: ffff888026e2b148 (&timer->lock){..-.}-{2:2}, at: snd_timer_interrupt.part.0+0x34/0xcf0 sound/core/timer.c:857 but this lock took another, SOFTIRQ-READ-unsafe lock in the past: (&new->fa_lock){.+.+}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&new->fa_lock); local_irq_disable(); lock(&timer->lock); lock(&new->fa_lock); lock(&timer->lock); *** DEADLOCK *** 2 locks held by syz-executor.0/31021: #0: ffff88807f734120 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1613 [inline] #0: ffff88807f734120 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: pppoe_sendmsg+0x99/0x750 drivers/net/ppp/pppoe.c:849 #1: ffffc90000dc0d90 ((&priv->tlist)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #1: ffffc90000dc0d90 ((&priv->tlist)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411 the shortest dependencies between 2nd lock and 1st lock: -> (&new->fa_lock){.+.+}-{2:2} { HARDIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x132/0x460 fs/fcntl.c:1026 pipe_release+0x1ba/0x320 fs/pipe.c:728 __fput+0x288/0x920 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:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae SOFTIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x132/0x460 fs/fcntl.c:1026 pipe_release+0x1ba/0x320 fs/pipe.c:728 __fput+0x288/0x920 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:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:311 fasync_remove_entry+0xb6/0x1f0 fs/fcntl.c:890 fasync_helper+0x9e/0xb0 fs/fcntl.c:993 pipe_fasync+0xda/0x230 fs/pipe.c:746 __fput+0x712/0x920 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:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 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:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x132/0x460 fs/fcntl.c:1026 pipe_release+0x1ba/0x320 fs/pipe.c:728 __fput+0x288/0x920 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:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae } ... key at: [] __key.0+0x0/0x40 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x132/0x460 fs/fcntl.c:1026 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/0x24c0 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:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 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 -> (&timer->lock){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 snd_timer_interrupt.part.0+0x34/0xcf0 sound/core/timer.c:857 snd_timer_interrupt sound/core/timer.c:1155 [inline] snd_timer_s_function+0x14b/0x200 sound/core/timer.c:1155 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 do_softirq.part.0+0xde/0x130 kernel/softirq.c:459 do_softirq kernel/softirq.c:451 [inline] __local_bh_enable_ip+0x102/0x120 kernel/softirq.c:383 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:757 [inline] __dev_queue_xmit+0x1b04/0x3620 net/core/dev.c:4312 pppoe_sendmsg+0x5ce/0x750 drivers/net/ppp/pppoe.c:900 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:723 ____sys_sendmsg+0x331/0x810 net/socket.c:2392 ___sys_sendmsg+0xf3/0x170 net/socket.c:2446 __sys_sendmmsg+0x195/0x470 net/socket.c:2532 __do_sys_sendmmsg net/socket.c:2561 [inline] __se_sys_sendmmsg net/socket.c:2558 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2558 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:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x32/0x50 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:379 [inline] snd_timer_close_locked+0x63/0xbb0 sound/core/timer.c:396 snd_timer_close+0x87/0xf0 sound/core/timer.c:463 snd_seq_timer_close+0x8c/0xe0 sound/core/seq/seq_timer.c:326 queue_delete+0x4a/0xa0 sound/core/seq/seq_queue.c:134 snd_seq_queue_delete+0x45/0x60 sound/core/seq/seq_queue.c:196 snd_seq_kernel_client_ctl+0x102/0x1e0 sound/core/seq/seq_clientmgr.c:2369 delete_seq_queue.part.0.isra.0+0xa2/0x110 sound/core/seq/oss/seq_oss_init.c:377 delete_seq_queue sound/core/seq/oss/seq_oss_init.c:373 [inline] snd_seq_oss_release+0x10b/0x1a0 sound/core/seq/oss/seq_oss_init.c:422 odev_release+0x4f/0x70 sound/core/seq/oss/seq_oss.c:144 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xbd4/0x2a60 kernel/exit.c:825 do_group_exit+0x125/0x310 kernel/exit.c:922 get_signal+0x47f/0x2160 kernel/signal.c:2808 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:865 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae } ... key at: [] __key.12+0x0/0x40 ... acquired at: mark_usage kernel/locking/lockdep.c:4488 [inline] __lock_acquire+0x11d5/0x54a0 kernel/locking/lockdep.c:4969 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 snd_timer_interrupt.part.0+0x34/0xcf0 sound/core/timer.c:857 snd_timer_interrupt sound/core/timer.c:1155 [inline] snd_timer_s_function+0x14b/0x200 sound/core/timer.c:1155 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 do_softirq.part.0+0xde/0x130 kernel/softirq.c:459 do_softirq kernel/softirq.c:451 [inline] __local_bh_enable_ip+0x102/0x120 kernel/softirq.c:383 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:757 [inline] __dev_queue_xmit+0x1b04/0x3620 net/core/dev.c:4312 pppoe_sendmsg+0x5ce/0x750 drivers/net/ppp/pppoe.c:900 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:723 ____sys_sendmsg+0x331/0x810 net/socket.c:2392 ___sys_sendmsg+0xf3/0x170 net/socket.c:2446 __sys_sendmmsg+0x195/0x470 net/socket.c:2532 __do_sys_sendmmsg net/socket.c:2561 [inline] __se_sys_sendmmsg net/socket.c:2558 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2558 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: 1 PID: 31021 Comm: syz-executor.0 Not tainted 5.14.0-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:105 print_irq_inversion_bug kernel/locking/lockdep.c:203 [inline] check_usage_forwards kernel/locking/lockdep.c:4031 [inline] mark_lock_irq kernel/locking/lockdep.c:4163 [inline] mark_lock.cold+0x86/0x8e kernel/locking/lockdep.c:4593 mark_usage kernel/locking/lockdep.c:4488 [inline] __lock_acquire+0x11d5/0x54a0 kernel/locking/lockdep.c:4969 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 snd_timer_interrupt.part.0+0x34/0xcf0 sound/core/timer.c:857 snd_timer_interrupt sound/core/timer.c:1155 [inline] snd_timer_s_function+0x14b/0x200 sound/core/timer.c:1155 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 do_softirq.part.0+0xde/0x130 kernel/softirq.c:459 do_softirq kernel/softirq.c:451 [inline] __local_bh_enable_ip+0x102/0x120 kernel/softirq.c:383 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:757 [inline] __dev_queue_xmit+0x1b04/0x3620 net/core/dev.c:4312 pppoe_sendmsg+0x5ce/0x750 drivers/net/ppp/pppoe.c:900 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:723 ____sys_sendmsg+0x331/0x810 net/socket.c:2392 ___sys_sendmsg+0xf3/0x170 net/socket.c:2446 __sys_sendmmsg+0x195/0x470 net/socket.c:2532 __do_sys_sendmmsg net/socket.c:2561 [inline] __se_sys_sendmmsg net/socket.c:2558 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2558 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:0x4665f9 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:00007f0858603188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9 RDX: 04000000000000eb RSI: 000000002000d180 RDI: 0000000000000004 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 0000000000a9fb1f R14: 00007f0858603300 R15: 0000000000022000