syzbot


possible deadlock in evdev_pass_values (3)

Status: auto-obsoleted due to no activity on 2024/11/05 23:17
Reported-by: syzbot+1a5704d7a7b2de0f743b@syzkaller.appspotmail.com
First crash: 148d, last: 115d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in evdev_pass_values fuse kernfs 351 619d 1441d 0/28 closed as dup on 2021/07/02 09:55
linux-6.1 possible deadlock in evdev_pass_values (3) 17 200d 267d 0/3 auto-obsoleted due to no activity on 2024/08/12 15:10
linux-6.1 possible deadlock in evdev_pass_values 1 538d 538d 0/3 auto-obsoleted due to no activity on 2023/10/09 19:52
linux-5.15 possible deadlock in evdev_pass_values 6 416d 519d 0/3 auto-obsoleted due to no activity on 2024/02/09 07:09
upstream possible deadlock in evdev_pass_values (2) input 948 3d15h 610d 0/28 upstream: reported on 2023/04/21 09:42
linux-5.15 possible deadlock in evdev_pass_values (2) 22 234d 311d 0/3 auto-obsoleted due to no activity on 2024/07/10 03:27
linux-6.1 possible deadlock in evdev_pass_values (2) 1 399d 399d 0/3 auto-obsoleted due to no activity on 2024/02/25 22:49

Sample crash report:
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
5.15.165-syzkaller #0 Not tainted
-----------------------------------------------------
syz.2.2690/15389 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffffffff8c60a058 (tasklist_lock){.+.+}-{2:2}, at: send_sigio+0xd2/0x330 fs/fcntl.c:810

and this task is already holding:
ffff888023ca1538 (&f->f_owner.lock){...-}-{2:2}, at: send_sigio+0x2f/0x330 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:
 (&client->buffer_lock){..-.}-{2:2}

... which became SOFTIRQ-irq-safe at:
  lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
  __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
  _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
  spin_lock include/linux/spinlock.h:363 [inline]
  evdev_pass_values+0xe7/0xb60 drivers/input/evdev.c:261
  evdev_events+0x198/0x2c0 drivers/input/evdev.c:306
  input_to_handler drivers/input/input.c:126 [inline]
  input_pass_values+0x873/0x1200 drivers/input/input.c:156
  input_handle_event+0xd3d/0x1600 drivers/input/input.c:426
  input_event+0x9d/0xd0 drivers/input/input.c:457
  hidinput_hid_event+0x1135/0x18e0 drivers/hid/hid-input.c:1467
  hid_process_event+0x433/0x580 drivers/hid/hid-core.c:1538
  hid_input_field drivers/hid/hid-core.c:1582 [inline]
  hid_report_raw_event+0xe9e/0x1640 drivers/hid/hid-core.c:1806
  hid_input_report+0x419/0x4d0 drivers/hid/hid-core.c:1873
  hid_irq_in+0x45c/0x690 drivers/hid/usbhid/hid-core.c:284
  __usb_hcd_giveback_urb+0x371/0x530 drivers/usb/core/hcd.c:1674
  dummy_timer+0x8ad/0x3200 drivers/usb/gadget/udc/dummy_hcd.c:1987
  call_timer_fn+0x16d/0x560 kernel/time/timer.c:1451
  expire_timers kernel/time/timer.c:1496 [inline]
  __run_timers+0x67c/0x890 kernel/time/timer.c:1767
  run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
  handle_softirqs+0x3a7/0x930 kernel/softirq.c:558
  __do_softirq kernel/softirq.c:592 [inline]
  invoke_softirq kernel/softirq.c:432 [inline]
  __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641
  irq_exit_rcu+0x5/0x20 kernel/softirq.c:653
  sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1096
  asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
  bytes_is_nonzero mm/kasan/generic.c:85 [inline]
  memory_is_nonzero mm/kasan/generic.c:102 [inline]
  memory_is_poisoned_n mm/kasan/generic.c:128 [inline]
  memory_is_poisoned mm/kasan/generic.c:159 [inline]
  check_region_inline mm/kasan/generic.c:180 [inline]
  kasan_check_range+0x7b/0x290 mm/kasan/generic.c:189
  instrument_atomic_read include/linux/instrumented.h:71 [inline]
  atomic_long_read include/linux/atomic/atomic-instrumented.h:1183 [inline]
  zone_page_state include/linux/vmstat.h:210 [inline]
  zone_watermark_fast+0x43/0x240 mm/page_alloc.c:3924
  get_page_from_freelist+0x4af/0x33c0 mm/page_alloc.c:4113
  __alloc_pages+0x272/0x700 mm/page_alloc.c:5423
  alloc_pages_vma+0x39a/0x800 mm/mempolicy.c:2146
  shmem_alloc_page mm/shmem.c:1586 [inline]
  shmem_alloc_and_acct_page+0x4d1/0xd10 mm/shmem.c:1611
  shmem_getpage_gfp+0x17b1/0x3190 mm/shmem.c:1906
  shmem_getpage mm/shmem.c:151 [inline]
  shmem_write_begin+0xce/0x1a0 mm/shmem.c:2477
  generic_perform_write+0x2bf/0x5b0 mm/filemap.c:3785
  __generic_file_write_iter+0x243/0x4f0 mm/filemap.c:3912
  generic_file_write_iter+0xa7/0x1b0 mm/filemap.c:3944
  call_write_iter include/linux/fs.h:2172 [inline]
  new_sync_write fs/read_write.c:507 [inline]
  vfs_write+0xacd/0xe50 fs/read_write.c:594
  ksys_write+0x1a2/0x2c0 fs/read_write.c:647
  do_syscall_x64 arch/x86/entry/common.c:50 [inline]
  do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
  entry_SYSCALL_64_after_hwframe+0x66/0xd0

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

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
  __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
  _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
  do_wait+0x2a7/0xaf0 kernel/exit.c:1578
  kernel_wait+0xe5/0x230 kernel/exit.c:1768
  call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
  call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
  process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
  worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
  kthread+0x3f6/0x4f0 kernel/kthread.c:334
  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

other info that might help us debug this:

Chain exists of:
  &client->buffer_lock --> &f->f_owner.lock --> tasklist_lock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(tasklist_lock);
                               local_irq_disable();
                               lock(&client->buffer_lock);
                               lock(&f->f_owner.lock);
  <Interrupt>
    lock(&client->buffer_lock);

 *** DEADLOCK ***

3 locks held by syz.2.2690/15389:
 #0: ffffffff914d3b78 (&fsnotify_mark_srcu){....}-{0:0}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
 #1: ffff888065ae2100 (&mark->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
 #1: ffff888065ae2100 (&mark->lock){+.+.}-{2:2}, at: dnotify_handle_event+0x5d/0x440 fs/notify/dnotify/dnotify.c:89
 #2: ffff888023ca1538 (&f->f_owner.lock){...-}-{2:2}, at: send_sigio+0x2f/0x330 fs/fcntl.c:796

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
  -> (&client->buffer_lock){..-.}-{2:2} {
     IN-SOFTIRQ-W at:
                        lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                        __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
                        _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                        spin_lock include/linux/spinlock.h:363 [inline]
                        evdev_pass_values+0xe7/0xb60 drivers/input/evdev.c:261
                        evdev_events+0x198/0x2c0 drivers/input/evdev.c:306
                        input_to_handler drivers/input/input.c:126 [inline]
                        input_pass_values+0x873/0x1200 drivers/input/input.c:156
                        input_handle_event+0xd3d/0x1600 drivers/input/input.c:426
                        input_event+0x9d/0xd0 drivers/input/input.c:457
                        hidinput_hid_event+0x1135/0x18e0 drivers/hid/hid-input.c:1467
                        hid_process_event+0x433/0x580 drivers/hid/hid-core.c:1538
                        hid_input_field drivers/hid/hid-core.c:1582 [inline]
                        hid_report_raw_event+0xe9e/0x1640 drivers/hid/hid-core.c:1806
                        hid_input_report+0x419/0x4d0 drivers/hid/hid-core.c:1873
                        hid_irq_in+0x45c/0x690 drivers/hid/usbhid/hid-core.c:284
                        __usb_hcd_giveback_urb+0x371/0x530 drivers/usb/core/hcd.c:1674
                        dummy_timer+0x8ad/0x3200 drivers/usb/gadget/udc/dummy_hcd.c:1987
                        call_timer_fn+0x16d/0x560 kernel/time/timer.c:1451
                        expire_timers kernel/time/timer.c:1496 [inline]
                        __run_timers+0x67c/0x890 kernel/time/timer.c:1767
                        run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
                        handle_softirqs+0x3a7/0x930 kernel/softirq.c:558
                        __do_softirq kernel/softirq.c:592 [inline]
                        invoke_softirq kernel/softirq.c:432 [inline]
                        __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641
                        irq_exit_rcu+0x5/0x20 kernel/softirq.c:653
                        sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1096
                        asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
                        bytes_is_nonzero mm/kasan/generic.c:85 [inline]
                        memory_is_nonzero mm/kasan/generic.c:102 [inline]
                        memory_is_poisoned_n mm/kasan/generic.c:128 [inline]
                        memory_is_poisoned mm/kasan/generic.c:159 [inline]
                        check_region_inline mm/kasan/generic.c:180 [inline]
                        kasan_check_range+0x7b/0x290 mm/kasan/generic.c:189
                        instrument_atomic_read include/linux/instrumented.h:71 [inline]
                        atomic_long_read include/linux/atomic/atomic-instrumented.h:1183 [inline]
                        zone_page_state include/linux/vmstat.h:210 [inline]
                        zone_watermark_fast+0x43/0x240 mm/page_alloc.c:3924
                        get_page_from_freelist+0x4af/0x33c0 mm/page_alloc.c:4113
                        __alloc_pages+0x272/0x700 mm/page_alloc.c:5423
                        alloc_pages_vma+0x39a/0x800 mm/mempolicy.c:2146
                        shmem_alloc_page mm/shmem.c:1586 [inline]
                        shmem_alloc_and_acct_page+0x4d1/0xd10 mm/shmem.c:1611
                        shmem_getpage_gfp+0x17b1/0x3190 mm/shmem.c:1906
                        shmem_getpage mm/shmem.c:151 [inline]
                        shmem_write_begin+0xce/0x1a0 mm/shmem.c:2477
                        generic_perform_write+0x2bf/0x5b0 mm/filemap.c:3785
                        __generic_file_write_iter+0x243/0x4f0 mm/filemap.c:3912
                        generic_file_write_iter+0xa7/0x1b0 mm/filemap.c:3944
                        call_write_iter include/linux/fs.h:2172 [inline]
                        new_sync_write fs/read_write.c:507 [inline]
                        vfs_write+0xacd/0xe50 fs/read_write.c:594
                        ksys_write+0x1a2/0x2c0 fs/read_write.c:647
                        do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                        do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
                        entry_SYSCALL_64_after_hwframe+0x66/0xd0
     INITIAL USE at:
                       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                       __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
                       _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                       spin_lock include/linux/spinlock.h:363 [inline]
                       evdev_pass_values+0xe7/0xb60 drivers/input/evdev.c:261
                       evdev_events+0x198/0x2c0 drivers/input/evdev.c:306
                       input_to_handler drivers/input/input.c:126 [inline]
                       input_pass_values+0x873/0x1200 drivers/input/input.c:156
                       input_handle_event+0xc9b/0x1600 drivers/input/input.c:415
                       input_inject_event+0x1fc/0x300 drivers/input/input.c:487
                       evdev_write+0x668/0x7c0 drivers/input/evdev.c:530
                       vfs_write+0x30c/0xe50 fs/read_write.c:592
                       ksys_write+0x1a2/0x2c0 fs/read_write.c:647
                       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                       do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
                       entry_SYSCALL_64_after_hwframe+0x66/0xd0
   }
   ... key      at: [<ffffffff917cdce0>] evdev_open.__key.23+0x0/0x20
 -> (&new->fa_lock){...-}-{2:2} {
    IN-SOFTIRQ-R at:
                      lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                      __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
                      _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
                      kill_fasync_rcu fs/fcntl.c:1014 [inline]
                      kill_fasync+0x16a/0x490 fs/fcntl.c:1035
                      sock_wake_async+0x145/0x170
                      sk_wake_async+0x15d/0x250 include/net/sock.h:2460
                      sock_def_readable+0x181/0x240 net/core/sock.c:3094
                      tcp_data_queue+0x2146/0x6f20 net/ipv4/tcp_input.c:5124
                      tcp_rcv_established+0xe3e/0x1e20 net/ipv4/tcp_input.c:6023
                      tcp_v6_do_rcv+0x4f2/0x10f0 net/ipv6/tcp_ipv6.c:1526
                      tcp_v6_rcv+0x2220/0x27b0 net/ipv6/tcp_ipv6.c:1767
                      ip6_protocol_deliver_rcu+0x93d/0x12d0 net/ipv6/ip6_input.c:425
                      ip6_input_finish+0xa2/0x130 net/ipv6/ip6_input.c:466
                      NF_HOOK+0x364/0x410 include/linux/netfilter.h:302
                      NF_HOOK+0x364/0x410 include/linux/netfilter.h:302
                      __netif_receive_skb_one_core net/core/dev.c:5485 [inline]
                      __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5599
                      process_backlog+0x363/0x7f0 net/core/dev.c:6476
                      __napi_poll+0xc7/0x440 net/core/dev.c:7035
                      napi_poll net/core/dev.c:7102 [inline]
                      net_rx_action+0x617/0xda0 net/core/dev.c:7192
                      handle_softirqs+0x3a7/0x930 kernel/softirq.c:558
                      do_softirq+0x162/0x240 kernel/softirq.c:459
                      __local_bh_enable_ip+0x1b1/0x1f0 kernel/softirq.c:383
                      sk_stream_wait_memory+0x709/0xe80 net/core/stream.c:145
                      tcp_sendmsg_locked+0x1468/0x3a90 net/ipv4/tcp.c:1419
                      tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1457
                      sock_sendmsg_nosec net/socket.c:704 [inline]
                      __sock_sendmsg net/socket.c:716 [inline]
                      __sys_sendto+0x564/0x720 net/socket.c:2058
                      __do_sys_sendto net/socket.c:2070 [inline]
                      __se_sys_sendto net/socket.c:2066 [inline]
                      __x64_sys_sendto+0xda/0xf0 net/socket.c:2066
                      do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                      do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
                      entry_SYSCALL_64_after_hwframe+0x66/0xd0
    INITIAL USE at:
                     lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline]
                     _raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:316
                     fasync_remove_entry+0xfb/0x1d0 fs/fcntl.c:891
                     sock_fasync+0x86/0xf0 net/socket.c:1361
                     __fput+0x766/0x8e0 fs/file_table.c:277
                     task_work_run+0x129/0x1a0 kernel/task_work.c:188
                     get_signal+0x143a/0x14e0 kernel/signal.c:2669
                     arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
                     handle_signal_work kernel/entry/common.c:154 [inline]
                     exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178
                     exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
                     __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
                     syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
                     do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
                     entry_SYSCALL_64_after_hwframe+0x66/0xd0
    INITIAL READ USE at:
                          lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                          __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
                          _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
                          kill_fasync_rcu fs/fcntl.c:1014 [inline]
                          kill_fasync+0x16a/0x490 fs/fcntl.c:1035
                          sock_wake_async+0x145/0x170
                          sk_wake_async+0x15d/0x250 include/net/sock.h:2460
                          unix_release_sock+0x535/0xaa0 net/unix/af_unix.c:562
                          unix_release+0x88/0xc0 net/unix/af_unix.c:940
                          __sock_release net/socket.c:649 [inline]
                          sock_close+0xcd/0x230 net/socket.c:1336
                          __fput+0x3fe/0x8e0 fs/file_table.c:280
                          task_work_run+0x129/0x1a0 kernel/task_work.c:188
                          get_signal+0x143a/0x14e0 kernel/signal.c:2669
                          arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
                          handle_signal_work kernel/entry/common.c:154 [inline]
                          exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178
                          exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
                          __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
                          syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
                          do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
                          entry_SYSCALL_64_after_hwframe+0x66/0xd0
  }
  ... key      at: [<ffffffff914d0940>] fasync_insert_entry.__key+0x0/0x20
  ... acquired at:
   lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
   _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:1014 [inline]
   kill_fasync+0x16a/0x490 fs/fcntl.c:1035
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values+0x5ad/0xb60 drivers/input/evdev.c:278
   evdev_events+0x198/0x2c0 drivers/input/evdev.c:306
   input_to_handler drivers/input/input.c:126 [inline]
   input_pass_values+0x873/0x1200 drivers/input/input.c:156
   input_handle_event+0xc9b/0x1600 drivers/input/input.c:415
   input_inject_event+0x1fc/0x300 drivers/input/input.c:487
   evdev_write+0x668/0x7c0 drivers/input/evdev.c:530
   vfs_write+0x30c/0xe50 fs/read_write.c:592
   ksys_write+0x1a2/0x2c0 fs/read_write.c:647
   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
   entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> (&f->f_owner.lock){...-}-{2:2} {
   IN-SOFTIRQ-R at:
                    lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                    __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
                    _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
                    send_sigurg+0x25/0x380 fs/fcntl.c:835
                    sk_send_sigurg+0x6a/0xb0 net/core/sock.c:3128
                    tcp_check_urg net/ipv4/tcp_input.c:5645 [inline]
                    tcp_urg+0x2b8/0xb40 net/ipv4/tcp_input.c:5686
                    tcp_rcv_established+0xe33/0x1e20 net/ipv4/tcp_input.c:6020
                    tcp_v6_do_rcv+0x4f2/0x10f0 net/ipv6/tcp_ipv6.c:1526
                    tcp_v6_rcv+0x2220/0x27b0 net/ipv6/tcp_ipv6.c:1767
                    ip6_protocol_deliver_rcu+0x93d/0x12d0 net/ipv6/ip6_input.c:425
                    ip6_input_finish+0xa2/0x130 net/ipv6/ip6_input.c:466
                    NF_HOOK+0x364/0x410 include/linux/netfilter.h:302
                    NF_HOOK+0x364/0x410 include/linux/netfilter.h:302
                    __netif_receive_skb_one_core net/core/dev.c:5485 [inline]
                    __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5599
                    process_backlog+0x363/0x7f0 net/core/dev.c:6476
                    __napi_poll+0xc7/0x440 net/core/dev.c:7035
                    napi_poll net/core/dev.c:7102 [inline]
                    net_rx_action+0x617/0xda0 net/core/dev.c:7192
                    handle_softirqs+0x3a7/0x930 kernel/softirq.c:558
                    do_softirq+0x162/0x240 kernel/softirq.c:459
                    __local_bh_enable_ip+0x1b1/0x1f0 kernel/softirq.c:383
                    sk_stream_wait_memory+0x709/0xe80 net/core/stream.c:145
                    tcp_sendmsg_locked+0x1468/0x3a90 net/ipv4/tcp.c:1419
                    tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1457
                    sock_sendmsg_nosec net/socket.c:704 [inline]
                    __sock_sendmsg net/socket.c:716 [inline]
                    __sys_sendto+0x564/0x720 net/socket.c:2058
                    __do_sys_sendto net/socket.c:2070 [inline]
                    __se_sys_sendto net/socket.c:2066 [inline]
                    __x64_sys_sendto+0xda/0xf0 net/socket.c:2066
                    do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                    do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
                    entry_SYSCALL_64_after_hwframe+0x66/0xd0
   INITIAL USE at:
                   lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline]
                   _raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:316
                   f_modown+0x38/0x340 fs/fcntl.c:91
                   __f_setown fs/fcntl.c:110 [inline]
                   f_setown+0x127/0x1d0 fs/fcntl.c:138
                   do_fcntl+0x1b7/0x1600 fs/fcntl.c:393
                   __do_sys_fcntl fs/fcntl.c:472 [inline]
                   __se_sys_fcntl+0xd8/0x1b0 fs/fcntl.c:457
                   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
                   entry_SYSCALL_64_after_hwframe+0x66/0xd0
   INITIAL READ USE at:
                        lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                        __raw_read_lock_irq include/linux/rwlock_api_smp.h:169 [inline]
                        _raw_read_lock_irq+0xd6/0x120 kernel/locking/spinlock.c:244
                        f_getown_ex fs/fcntl.c:212 [inline]
                        do_fcntl+0x160/0x1600 fs/fcntl.c:396
                        __do_sys_fcntl fs/fcntl.c:472 [inline]
                        __se_sys_fcntl+0xd8/0x1b0 fs/fcntl.c:457
                        do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                        do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
                        entry_SYSCALL_64_after_hwframe+0x66/0xd0
 }
 ... key      at: [<ffffffff914cfcc0>] __alloc_file.__key+0x0/0x10
 ... acquired at:
   lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
   _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
   send_sigio+0x2f/0x330 fs/fcntl.c:796
   kill_fasync_rcu fs/fcntl.c:1021 [inline]
   kill_fasync+0x20c/0x490 fs/fcntl.c:1035
   sock_wake_async+0x145/0x170
   sk_wake_async+0x15d/0x250 include/net/sock.h:2460
   unix_release_sock+0x535/0xaa0 net/unix/af_unix.c:562
   unix_release+0x88/0xc0 net/unix/af_unix.c:940
   __sock_release net/socket.c:649 [inline]
   sock_close+0xcd/0x230 net/socket.c:1336
   __fput+0x3fe/0x8e0 fs/file_table.c:280
   task_work_run+0x129/0x1a0 kernel/task_work.c:188
   get_signal+0x143a/0x14e0 kernel/signal.c:2669
   arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
   handle_signal_work kernel/entry/common.c:154 [inline]
   exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178
   exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
   __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
   syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
   do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
   entry_SYSCALL_64_after_hwframe+0x66/0xd0


the dependencies between the lock to be acquired
 and SOFTIRQ-irq-unsafe lock:
-> (tasklist_lock){.+.+}-{2:2} {
   HARDIRQ-ON-R at:
                    lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                    __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
                    _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                    do_wait+0x2a7/0xaf0 kernel/exit.c:1578
                    kernel_wait+0xe5/0x230 kernel/exit.c:1768
                    call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                    call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
                    process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
                    worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
                    kthread+0x3f6/0x4f0 kernel/kthread.c:334
                    ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
   SOFTIRQ-ON-R at:
                    lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                    __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
                    _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                    do_wait+0x2a7/0xaf0 kernel/exit.c:1578
                    kernel_wait+0xe5/0x230 kernel/exit.c:1768
                    call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                    call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
                    process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
                    worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
                    kthread+0x3f6/0x4f0 kernel/kthread.c:334
                    ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
   INITIAL USE at:
                   lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline]
                   _raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:316
                   copy_process+0x22be/0x3ef0 kernel/fork.c:2337
                   kernel_clone+0x210/0x960 kernel/fork.c:2604
                   kernel_thread+0x168/0x1e0 kernel/fork.c:2656
                   rest_init+0x21/0x330 init/main.c:706
                   start_kernel+0x48c/0x540 init/main.c:1140
                   secondary_startup_64_no_verify+0xb1/0xbb
   INITIAL READ USE at:
                        lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
                        __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
                        _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                        do_wait+0x2a7/0xaf0 kernel/exit.c:1578
                        kernel_wait+0xe5/0x230 kernel/exit.c:1768
                        call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                        call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
                        process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
                        worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
                        kthread+0x3f6/0x4f0 kernel/kthread.c:334
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 }
 ... key      at: [<ffffffff8c60a058>] tasklist_lock+0x18/0x40
 ... acquired at:
   lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
   __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
   _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
   send_sigio+0xd2/0x330 fs/fcntl.c:810
   dnotify_handle_event+0x138/0x440 fs/notify/dnotify/dnotify.c:97
   fsnotify_handle_inode_event fs/notify/fsnotify.c:264 [inline]
   fsnotify_handle_event fs/notify/fsnotify.c:316 [inline]
   send_to_group fs/notify/fsnotify.c:364 [inline]
   fsnotify+0x1cee/0x2450 fs/notify/fsnotify.c:570
   fsnotify_parent include/linux/fsnotify.h:80 [inline]
   fsnotify_file include/linux/fsnotify.h:105 [inline]
   fsnotify_access include/linux/fsnotify.h:315 [inline]
   do_iter_read+0x5e3/0x760 fs/read_write.c:795
   vfs_readv fs/read_write.c:910 [inline]
   do_preadv+0x211/0x350 fs/read_write.c:1002
   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
   do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
   entry_SYSCALL_64_after_hwframe+0x66/0xd0


stack backtrace:
CPU: 0 PID: 15389 Comm: syz.2.2690 Not tainted 5.15.165-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_bad_irq_dependency kernel/locking/lockdep.c:2567 [inline]
 check_irq_usage kernel/locking/lockdep.c:2806 [inline]
 check_prev_add kernel/locking/lockdep.c:3057 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain+0x4d01/0x5930 kernel/locking/lockdep.c:3788
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
 _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
 send_sigio+0xd2/0x330 fs/fcntl.c:810
 dnotify_handle_event+0x138/0x440 fs/notify/dnotify/dnotify.c:97
 fsnotify_handle_inode_event fs/notify/fsnotify.c:264 [inline]
 fsnotify_handle_event fs/notify/fsnotify.c:316 [inline]
 send_to_group fs/notify/fsnotify.c:364 [inline]
 fsnotify+0x1cee/0x2450 fs/notify/fsnotify.c:570
 fsnotify_parent include/linux/fsnotify.h:80 [inline]
 fsnotify_file include/linux/fsnotify.h:105 [inline]
 fsnotify_access include/linux/fsnotify.h:315 [inline]
 do_iter_read+0x5e3/0x760 fs/read_write.c:795
 vfs_readv fs/read_write.c:910 [inline]
 do_preadv+0x211/0x350 fs/read_write.c:1002
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fd68b8f4e79
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd689d2f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00007fd68ba91130 RCX: 00007fd68b8f4e79
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007fd68b96293e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fd68ba91130 R15: 00007ffdbb3ba908
 </TASK>

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/27 23:17 linux-5.15.y fa93fa65db6e 6c853ff9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/16 16:04 linux-5.15.y 7e89efd3ae1c e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/14 11:33 linux-5.15.y 7e89efd3ae1c 07a4d4ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/14 04:35 linux-5.15.y 7e89efd3ae1c bde81f6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/14 04:35 linux-5.15.y 7e89efd3ae1c bde81f6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/13 15:58 linux-5.15.y 7e89efd3ae1c f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/13 05:33 linux-5.15.y 7e89efd3ae1c 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/08/01 02:01 linux-5.15.y 7e89efd3ae1c 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/07/26 18:50 linux-5.15.y 7c6d66f0266f 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/07/25 12:12 linux-5.15.y 7c6d66f0266f 466a14e5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2024/07/25 12:12 linux-5.15.y 7c6d66f0266f 466a14e5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
* Struck through repros no longer work on HEAD.