syzbot


possible deadlock in _snd_pcm_stream_lock_irqsave (2)

Status: fixed on 2021/11/10 00:50
Subsystems: fs
[Documentation on labels]
Fix commit: f671a691e299 fcntl: fix potential deadlocks for &fown_struct.lock
First crash: 1167d, last: 1060d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in _snd_pcm_stream_lock_irqsave (5) sound C 5210 172d 173d 25/28 fixed on 2024/04/22 10:23
upstream possible deadlock in _snd_pcm_stream_lock_irqsave C done 997 1449d 1486d 15/28 fixed on 2020/11/16 12:12
upstream possible deadlock in _snd_pcm_stream_lock_irqsave (3) sound C error done 284 785d 1059d 0/28 auto-obsoleted due to no activity on 2023/04/21 08:32
upstream possible deadlock in _snd_pcm_stream_lock_irqsave (4) sound C 24677 177d 199d 25/28 fixed on 2024/04/10 03:59

Sample crash report:
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
5.15.0-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor.0/17280 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff8880711b17f8 (&new->fa_lock){...-}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1014 [inline]
ffff8880711b17f8 (&new->fa_lock){...-}-{2:2}, at: kill_fasync fs/fcntl.c:1035 [inline]
ffff8880711b17f8 (&new->fa_lock){...-}-{2:2}, at: kill_fasync+0x136/0x470 fs/fcntl.c:1028

and this task is already holding:
ffff88814ac05148 (&timer->lock){....}-{2:2}, at: snd_timer_start1+0x5a/0x800 sound/core/timer.c:541
which would create a new lock dependency:
 (&timer->lock){....}-{2:2} -> (&new->fa_lock){...-}-{2:2}

but this new dependency connects a SOFTIRQ-irq-safe lock:
 (&group->lock){..-.}-{2:2}

... which became SOFTIRQ-irq-safe at:
  lock_acquire kernel/locking/lockdep.c:5640 [inline]
  lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
  __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
  _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
  _snd_pcm_stream_lock_irqsave+0x9f/0xd0 sound/core/pcm_native.c:170
  snd_pcm_period_elapsed+0x1d/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
  run_ksoftirqd kernel/softirq.c:920 [inline]
  run_ksoftirqd+0x2d/0x60 kernel/softirq.c:912
  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

to a SOFTIRQ-irq-unsafe lock:
 (tasklist_lock){.+.+}-{2:2}

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire kernel/locking/lockdep.c:5640 [inline]
  lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
  __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:1511
  kernel_wait+0x9c/0x150 kernel/exit.c:1701
  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:2298
  worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
  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:
  &group->lock --> &timer->lock --> tasklist_lock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(tasklist_lock);
                               local_irq_disable();
                               lock(&group->lock);
                               lock(&timer->lock);
  <Interrupt>
    lock(&group->lock);

 *** DEADLOCK ***

3 locks held by syz-executor.0/17280:
 #0: ffff88801d7ec168 (&tu->ioctl_lock){+.+.}-{3:3}, at: snd_timer_user_ioctl+0x4c/0xb0 sound/core/timer.c:2128
 #1: ffff88814ac05148 (&timer->lock){....}-{2:2}, at: snd_timer_start1+0x5a/0x800 sound/core/timer.c:541
 #2: ffffffff8b983a20 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x41/0x470 fs/fcntl.c:1033

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
 -> (&group->lock){..-.}-{2:2} {
    IN-SOFTIRQ-W at:
                      lock_acquire kernel/locking/lockdep.c:5640 [inline]
                      lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                      __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                      _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
                      _snd_pcm_stream_lock_irqsave+0x9f/0xd0 sound/core/pcm_native.c:170
                      snd_pcm_period_elapsed+0x1d/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
                      run_ksoftirqd kernel/softirq.c:920 [inline]
                      run_ksoftirqd+0x2d/0x60 kernel/softirq.c:912
                      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:5640 [inline]
                     lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                     __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
                     _raw_spin_lock_irq+0x32/0x50 kernel/locking/spinlock.c:170
                     spin_lock_irq include/linux/spinlock.h:375 [inline]
                     snd_pcm_group_lock_irq sound/core/pcm_native.c:97 [inline]
                     snd_pcm_stream_lock_irq sound/core/pcm_native.c:136 [inline]
                     snd_pcm_hw_params+0x12a/0x1990 sound/core/pcm_native.c:686
                     snd_pcm_kernel_ioctl+0x164/0x310 sound/core/pcm_native.c:3372
                     snd_pcm_oss_change_params_locked+0x1936/0x3a60 sound/core/oss/pcm_oss.c:947
                     snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1091 [inline]
                     snd_pcm_oss_make_ready+0xe7/0x1b0 sound/core/oss/pcm_oss.c:1150
                     snd_pcm_oss_sync+0x1de/0x800 sound/core/oss/pcm_oss.c:1717
                     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: [<ffffffff90604e20>] __key.9+0x0/0x40
-> (&timer->lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire kernel/locking/lockdep.c:5640 [inline]
                   lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                   __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
                   _raw_spin_lock_irq+0x32/0x50 kernel/locking/spinlock.c:170
                   spin_lock_irq include/linux/spinlock.h:375 [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+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: [<ffffffff906045c0>] __key.12+0x0/0x40
 ... acquired at:
   __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+0x2af/0x310 sound/core/pcm_native.c:3382
   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


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:5640 [inline]
                        lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                        __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:1511
                        kernel_wait+0x9c/0x150 kernel/exit.c:1701
                        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:2298
                        worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
                        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:5640 [inline]
                        lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                        __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:1511
                        kernel_wait+0x9c/0x150 kernel/exit.c:1701
                        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:2298
                        worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
                        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:5640 [inline]
                       lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                       __raw_write_lock_irq include/linux/rwlock_api_smp.h:194 [inline]
                       _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:316
                       copy_process+0x36c0/0x75a0 kernel/fork.c:2310
                       kernel_clone+0xe7/0xab0 kernel/fork.c:2581
                       kernel_thread+0xb5/0xf0 kernel/fork.c:2633
                       rest_init+0x23/0x3e0 init/main.c:690
                       start_kernel+0x47a/0x49b init/main.c:1133
                       secondary_startup_64_no_verify+0xb0/0xbb
     INITIAL READ USE at:
                            lock_acquire kernel/locking/lockdep.c:5640 [inline]
                            lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                            __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:1511
                            kernel_wait+0x9c/0x150 kernel/exit.c:1701
                            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:2298
                            worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
                            kthread+0x405/0x4f0 kernel/kthread.c:327
                            ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
   }
   ... key      at: [<ffffffff8b60a098>] tasklist_lock+0x18/0x40
   ... acquired at:
   __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
   fsnotify_insert_event+0x3ba/0x500 fs/notify/notification.c:128
   fsnotify_add_event include/linux/fsnotify_backend.h:561 [inline]
   inotify_handle_inode_event+0x31b/0x5c0 fs/notify/inotify/inotify_fsnotify.c:119
   fsnotify_handle_inode_event.isra.0+0x209/0x340 fs/notify/fsnotify.c:266
   fsnotify_handle_event fs/notify/fsnotify.c:313 [inline]
   send_to_group fs/notify/fsnotify.c:367 [inline]
   fsnotify+0xdda/0x12b0 fs/notify/fsnotify.c:543
   fsnotify_parent include/linux/fsnotify.h:80 [inline]
   fsnotify_file include/linux/fsnotify.h:99 [inline]
   fsnotify_open include/linux/fsnotify.h:290 [inline]
   do_sys_openat2+0x435/0x4d0 fs/open.c:1217
   do_sys_open fs/open.c:1228 [inline]
   __do_sys_open fs/open.c:1236 [inline]
   __se_sys_open fs/open.c:1232 [inline]
   __x64_sys_open+0x119/0x1c0 fs/open.c:1232
   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-SOFTIRQ-R at:
                      lock_acquire kernel/locking/lockdep.c:5640 [inline]
                      lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                      __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:3172
                      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_v4_do_rcv+0x600/0x8d0 net/ipv4/tcp_ipv4.c:1716
                      tcp_v4_rcv+0x2768/0x3080 net/ipv4/tcp_ipv4.c:2110
                      ip_protocol_deliver_rcu+0xa7/0xee0 net/ipv4/ip_input.c:204
                      ip_local_deliver_finish+0x20a/0x370 net/ipv4/ip_input.c:231
                      NF_HOOK include/linux/netfilter.h:307 [inline]
                      NF_HOOK include/linux/netfilter.h:301 [inline]
                      ip_local_deliver+0x1b3/0x200 net/ipv4/ip_input.c:252
                      dst_input include/net/dst.h:460 [inline]
                      ip_rcv_finish+0x1da/0x2f0 net/ipv4/ip_input.c:429
                      NF_HOOK include/linux/netfilter.h:307 [inline]
                      NF_HOOK include/linux/netfilter.h:301 [inline]
                      ip_rcv+0xaa/0xd0 net/ipv4/ip_input.c:540
                      __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5462
                      __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5576
                      process_backlog+0x2a5/0x6c0 net/core/dev.c:6452
                      __napi_poll+0xaf/0x440 net/core/dev.c:7017
                      napi_poll net/core/dev.c:7084 [inline]
                      net_rx_action+0x801/0xb40 net/core/dev.c:7171
                      __do_softirq+0x29b/0x9c2 kernel/softirq.c:558
                      run_ksoftirqd kernel/softirq.c:920 [inline]
                      run_ksoftirqd+0x2d/0x60 kernel/softirq.c:912
                      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:5640 [inline]
                     lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:194 [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:5640 [inline]
                          lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                          __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
                          fsnotify_insert_event+0x3ba/0x500 fs/notify/notification.c:128
                          fsnotify_add_event include/linux/fsnotify_backend.h:561 [inline]
                          inotify_handle_inode_event+0x31b/0x5c0 fs/notify/inotify/inotify_fsnotify.c:119
                          fsnotify_handle_inode_event.isra.0+0x209/0x340 fs/notify/fsnotify.c:266
                          fsnotify_handle_event fs/notify/fsnotify.c:313 [inline]
                          send_to_group fs/notify/fsnotify.c:367 [inline]
                          fsnotify+0xdda/0x12b0 fs/notify/fsnotify.c:543
                          fsnotify_parent include/linux/fsnotify.h:80 [inline]
                          fsnotify_file include/linux/fsnotify.h:99 [inline]
                          fsnotify_open include/linux/fsnotify.h:290 [inline]
                          do_sys_openat2+0x435/0x4d0 fs/open.c:1217
                          do_sys_open fs/open.c:1228 [inline]
                          __do_sys_open fs/open.c:1236 [inline]
                          __se_sys_open fs/open.c:1232 [inline]
                          __x64_sys_open+0x119/0x1c0 fs/open.c:1232
                          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: [<ffffffff90305de0>] __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
   fsnotify_insert_event+0x3ba/0x500 fs/notify/notification.c:128
   fsnotify_add_event include/linux/fsnotify_backend.h:561 [inline]
   inotify_handle_inode_event+0x31b/0x5c0 fs/notify/inotify/inotify_fsnotify.c:119
   fsnotify_handle_inode_event.isra.0+0x209/0x340 fs/notify/fsnotify.c:266
   fsnotify_handle_event fs/notify/fsnotify.c:313 [inline]
   send_to_group fs/notify/fsnotify.c:367 [inline]
   fsnotify+0xdda/0x12b0 fs/notify/fsnotify.c:543
   fsnotify_parent include/linux/fsnotify.h:80 [inline]
   fsnotify_file include/linux/fsnotify.h:99 [inline]
   fsnotify_open include/linux/fsnotify.h:290 [inline]
   do_sys_openat2+0x435/0x4d0 fs/open.c:1217
   do_sys_open fs/open.c:1228 [inline]
   __do_sys_open fs/open.c:1236 [inline]
   __se_sys_open fs/open.c:1232 [inline]
   __x64_sys_open+0x119/0x1c0 fs/open.c:1232
   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

-> (&new->fa_lock){...-}-{2:2} {
   IN-SOFTIRQ-R at:
                    lock_acquire kernel/locking/lockdep.c:5640 [inline]
                    lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                    __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
                    sock_wake_async+0xd2/0x160 net/socket.c:1368
                    sk_wake_async include/net/sock.h:2400 [inline]
                    sctp_data_ready+0x349/0x4e0 net/sctp/socket.c:9241
                    sctp_ulpq_tail_event+0x5d5/0xb60 net/sctp/ulpqueue.c:257
                    sctp_ulpq_tail_data+0x7a2/0xec0 net/sctp/ulpqueue.c:118
                    sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1454 [inline]
                    sctp_side_effects net/sctp/sm_sideeffect.c:1195 [inline]
                    sctp_do_sm+0x389b/0x4ed0 net/sctp/sm_sideeffect.c:1166
                    sctp_assoc_bh_rcv+0x386/0x6c0 net/sctp/associola.c:1054
                    sctp_inq_push+0x1da/0x270 net/sctp/inqueue.c:80
                    sctp_rcv+0xfe3/0x3290 net/sctp/input.c:256
                    sctp6_rcv+0x38/0x60 net/sctp/ipv6.c:1109
                    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:5462
                    __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5576
                    process_backlog+0x2a5/0x6c0 net/core/dev.c:6452
                    __napi_poll+0xaf/0x440 net/core/dev.c:7017
                    napi_poll net/core/dev.c:7084 [inline]
                    net_rx_action+0x801/0xb40 net/core/dev.c:7171
                    __do_softirq+0x29b/0x9c2 kernel/softirq.c:558
                    run_ksoftirqd kernel/softirq.c:920 [inline]
                    run_ksoftirqd+0x2d/0x60 kernel/softirq.c:912
                    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:5640 [inline]
                   lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:194 [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
                   fsnotify_fasync+0x4d/0x80 fs/notify/group.c:162
                   __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:5640 [inline]
                        lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
                        __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
                        fsnotify_insert_event+0x3ba/0x500 fs/notify/notification.c:128
                        fsnotify_add_event include/linux/fsnotify_backend.h:561 [inline]
                        inotify_handle_inode_event+0x31b/0x5c0 fs/notify/inotify/inotify_fsnotify.c:119
                        fsnotify_handle_inode_event.isra.0+0x209/0x340 fs/notify/fsnotify.c:266
                        fsnotify_handle_event fs/notify/fsnotify.c:313 [inline]
                        send_to_group fs/notify/fsnotify.c:367 [inline]
                        fsnotify+0xdda/0x12b0 fs/notify/fsnotify.c:543
                        fsnotify_parent include/linux/fsnotify.h:80 [inline]
                        fsnotify_file include/linux/fsnotify.h:99 [inline]
                        fsnotify_open include/linux/fsnotify.h:290 [inline]
                        do_sys_openat2+0x435/0x4d0 fs/open.c:1217
                        do_sys_open fs/open.c:1228 [inline]
                        __do_sys_open fs/open.c:1236 [inline]
                        __se_sys_open fs/open.c:1232 [inline]
                        __x64_sys_open+0x119/0x1c0 fs/open.c:1232
                        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: [<ffffffff90306bc0>] __key.0+0x0/0x40
 ... acquired at:
   lock_acquire kernel/locking/lockdep.c:5640 [inline]
   lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
   __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


stack backtrace:
CPU: 1 PID: 17280 Comm: syz-executor.0 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __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:2580 [inline]
 check_irq_usage.cold+0x4c1/0x6b0 kernel/locking/lockdep.c:2819
 check_prev_add kernel/locking/lockdep.c:3070 [inline]
 check_prevs_add kernel/locking/lockdep.c:3189 [inline]
 validate_chain kernel/locking/lockdep.c:3804 [inline]
 __lock_acquire+0x2a1f/0x54a0 kernel/locking/lockdep.c:5030
 lock_acquire kernel/locking/lockdep.c:5640 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5605
 __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
RIP: 0033:0x7f17ea033ae9
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:00007f17e75a9188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f17ea146f60 RCX: 00007f17ea033ae9
RDX: 0000000000000000 RSI: 00000000000054a0 RDI: 0000000000000003
RBP: 00007f17ea08df45 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f17ea67ab2f R14: 00007f17e75a9300 R15: 0000000000022000
 </TASK>

Crashes (120):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/09 00:54 upstream e851dfae4371 8ab17e57 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/08 18:29 upstream e851dfae4371 d29682f1 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/08 01:26 upstream 6b75d88fa81b 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/07 16:22 upstream b5013d084e03 4c1be0be .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/07 12:09 upstream b5013d084e03 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/06 21:31 upstream d4439a1189f9 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/06 19:47 upstream d4439a1189f9 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/06 11:03 upstream d4439a1189f9 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/06 07:36 upstream fe91c4725aee 4c1be0be .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/05 17:51 upstream d4439a1189f9 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/05 13:50 upstream d4439a1189f9 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/05 06:14 upstream d4439a1189f9 4c1be0be .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/03 10:00 upstream cc0356d6a02e 17f3edd2 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/11/01 23:41 upstream e66435936756 098b5d53 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/29 19:22 upstream f25a5481af12 2353a3ec .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/28 04:45 upstream 1fc596a56b33 be531bb4 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/28 03:17 upstream 1fc596a56b33 be531bb4 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/27 13:24 upstream d25f27432f80 373bf66b .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/26 13:30 upstream 3906fe9bb7f1 d50eb50a .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/25 05:27 upstream 87066fdd2e30 4f0000ee .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/24 18:39 upstream 6c62666d8879 282f03fb .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/22 20:44 upstream 64222515138e 282f03fb .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/22 12:39 upstream 2f111a6fd5b5 55f90bc6 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/22 03:50 upstream 2f111a6fd5b5 55f90bc6 .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/21 13:49 upstream 2f111a6fd5b5 c5cb7da8 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/21 12:02 upstream 2f111a6fd5b5 f111d03b .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/20 19:00 upstream 8e37395c3a5d 418a00eb .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/20 11:12 upstream d9abdee5fd5a 418a00eb .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/19 20:16 upstream d9abdee5fd5a 466b7db1 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/19 17:47 upstream d9abdee5fd5a 24dc29db .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/19 01:52 upstream 519d81956ee2 24dc29db .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/18 08:58 upstream cf52ad5ff16c 0c5d9412 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/17 10:24 upstream d999ade1cc86 0c5d9412 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/16 20:39 upstream 304040fb4909 0c5d9412 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/14 19:34 upstream 26d657410983 7aa5fe41 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/14 16:35 upstream 26d657410983 5462d470 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/14 00:09 upstream 348949d9a444 5462d470 .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/13 21:52 upstream 348949d9a444 5462d470 .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/11 10:43 upstream efb52a7d9511 838e7e2c .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/11 07:29 upstream 64570fbc14f8 838e7e2c .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/10 23:15 upstream efb52a7d9511 838e7e2c .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/10 19:25 upstream efb52a7d9511 838e7e2c .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/10 18:23 upstream efb52a7d9511 838e7e2c .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/09 18:22 upstream 717478d89fe2 838e7e2c .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/08 21:09 upstream 741668ef7832 efe0f24d .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/08 09:05 upstream 1da38549dd64 efe0f24d .config console log report info ci-upstream-kasan-gce-selinux-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/08 03:07 upstream 4a16df549d23 efe0f24d .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/07 22:26 upstream 4a16df549d23 efe0f24d .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/07 20:43 upstream 4a16df549d23 efe0f24d .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/07 19:07 upstream 4a16df549d23 efe0f24d .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/07 17:46 upstream 5af4055fa813 efe0f24d .config console log report info ci-upstream-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/07/24 19:37 upstream f0fddcec6b62 4d1b57d4 .config console log report info ci-upstream-kasan-gce possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/11 09:26 linux-next d3134eb5de85 838e7e2c .config console log report info ci-upstream-linux-next-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
2021/10/09 11:19 linux-next 683f29b781ae 838e7e2c .config console log report info ci-upstream-linux-next-kasan-gce-root possible deadlock in _snd_pcm_stream_lock_irqsave
* Struck through repros no longer work on HEAD.