syzbot


possible deadlock in evdev_pass_values

Status: closed as dup on 2021/07/02 09:55
Reported-by: syzbot+44ec99f248f7052472f1@syzkaller.appspotmail.com
First crash: 537d, last: 20d
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
possible deadlock in kill_fasync C done unreliable 394 302d 631d

Sample crash report:
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
5.19.0-rc1-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor.3/12819 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff8880720b39f0 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:995 [inline]
ffff8880720b39f0 (&new->fa_lock){....}-{2:2}, at: kill_fasync fs/fcntl.c:1016 [inline]
ffff8880720b39f0 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x136/0x470 fs/fcntl.c:1009

and this task is already holding:
ffff8880209b5028 (&client->buffer_lock){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff8880209b5028 (&client->buffer_lock){..-.}-{2:2}, at: evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261
which would create a new lock dependency:
 (&client->buffer_lock){..-.}-{2:2} -> (&new->fa_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 kernel/locking/lockdep.c:5665 [inline]
  lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
  __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
  _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
  spin_lock include/linux/spinlock.h:349 [inline]
  evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261
  evdev_pass_values drivers/input/evdev.c:253 [inline]
  evdev_events+0x359/0x3e0 drivers/input/evdev.c:306
  input_to_handler+0x2a0/0x4c0 drivers/input/input.c:126
  input_pass_values.part.0+0x230/0x710 drivers/input/input.c:156
  input_pass_values drivers/input/input.c:426 [inline]
  input_handle_event+0x67e/0x1440 drivers/input/input.c:426
  input_event drivers/input/input.c:457 [inline]
  input_event+0x8e/0xb0 drivers/input/input.c:449
  hidinput_hid_event+0x79d/0x2010 drivers/hid/hid-input.c:1631
  hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1527
  hid_input_array_field+0x4d7/0x660 drivers/hid/hid-core.c:1639
  hid_process_report drivers/hid/hid-core.c:1681 [inline]
  hid_report_raw_event+0xa8a/0x1280 drivers/hid/hid-core.c:1998
  hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:2065
  hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284
  __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
  usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747
  dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988
  call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474
  expire_timers kernel/time/timer.c:1519 [inline]
  __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790
  __run_timers kernel/time/timer.c:1768 [inline]
  run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803
  __do_softirq+0x29b/0x9c2 kernel/softirq.c:571
  invoke_softirq kernel/softirq.c:445 [inline]
  __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
  irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
  sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106
  asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
  native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
  arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
  acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
  acpi_idle_do_entry+0x1c9/0x240 drivers/acpi/processor_idle.c:554
  acpi_idle_enter+0x369/0x510 drivers/acpi/processor_idle.c:691
  cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237
  cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351
  call_cpuidle kernel/sched/idle.c:155 [inline]
  cpuidle_idle_call kernel/sched/idle.c:236 [inline]
  do_idle+0x3e8/0x590 kernel/sched/idle.c:303
  cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:400
  start_secondary+0x21d/0x2b0 arch/x86/kernel/smpboot.c:266
  secondary_startup_64_no_verify+0xce/0xdb

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

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire kernel/locking/lockdep.c:5665 [inline]
  lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
  __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
  _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228
  do_wait+0x284/0xce0 kernel/exit.c:1508
  kernel_wait+0x9c/0x150 kernel/exit.c:1698
  call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
  call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166
  process_one_work+0x996/0x1610 kernel/workqueue.c:2289
  worker_thread+0x665/0x1080 kernel/workqueue.c:2436
  kthread+0x2e9/0x3a0 kernel/kthread.c:376
  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302

other info that might help us debug this:

Chain exists of:
  &client->buffer_lock --> &new->fa_lock --> tasklist_lock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(tasklist_lock);
                               local_irq_disable();
                               lock(&client->buffer_lock);
                               lock(&new->fa_lock);
  <Interrupt>
    lock(&client->buffer_lock);

 *** DEADLOCK ***

7 locks held by syz-executor.3/12819:
 #0: ffff888023478110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_write+0x1d3/0x760 drivers/input/evdev.c:513
 #1: ffff8881468ff230 (&dev->event_lock#2){-.-.}-{2:2}, at: input_inject_event+0xa6/0x320 drivers/input/input.c:482
 #2: ffffffff8bd83be0 (rcu_read_lock){....}-{1:2}, at: is_event_supported drivers/input/input.c:64 [inline]
 #2: ffffffff8bd83be0 (rcu_read_lock){....}-{1:2}, at: is_event_supported drivers/input/input.c:61 [inline]
 #2: ffffffff8bd83be0 (rcu_read_lock){....}-{1:2}, at: input_inject_event+0x92/0x320 drivers/input/input.c:481
 #3: ffffffff8bd83be0 (rcu_read_lock){....}-{1:2}, at: input_pass_values.part.0+0x0/0x710 drivers/input/input.c:884
 #4: ffffffff8bd83be0 (rcu_read_lock){....}-{1:2}, at: evdev_events+0x59/0x3e0 drivers/input/evdev.c:296
 #5: ffff8880209b5028 (&client->buffer_lock){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
 #5: ffff8880209b5028 (&client->buffer_lock){..-.}-{2:2}, at: evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261
 #6: ffffffff8bd83be0 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x41/0x470 fs/fcntl.c:1014

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
-> (&client->buffer_lock){..-.}-{2:2} {
   IN-SOFTIRQ-W at:
                    lock_acquire kernel/locking/lockdep.c:5665 [inline]
                    lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                    __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
                    _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                    spin_lock include/linux/spinlock.h:349 [inline]
                    evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261
                    evdev_pass_values drivers/input/evdev.c:253 [inline]
                    evdev_events+0x359/0x3e0 drivers/input/evdev.c:306
                    input_to_handler+0x2a0/0x4c0 drivers/input/input.c:126
                    input_pass_values.part.0+0x230/0x710 drivers/input/input.c:156
                    input_pass_values drivers/input/input.c:426 [inline]
                    input_handle_event+0x67e/0x1440 drivers/input/input.c:426
                    input_event drivers/input/input.c:457 [inline]
                    input_event+0x8e/0xb0 drivers/input/input.c:449
                    hidinput_hid_event+0x79d/0x2010 drivers/hid/hid-input.c:1631
                    hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1527
                    hid_input_array_field+0x4d7/0x660 drivers/hid/hid-core.c:1639
                    hid_process_report drivers/hid/hid-core.c:1681 [inline]
                    hid_report_raw_event+0xa8a/0x1280 drivers/hid/hid-core.c:1998
                    hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:2065
                    hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284
                    __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
                    usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747
                    dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988
                    call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474
                    expire_timers kernel/time/timer.c:1519 [inline]
                    __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790
                    __run_timers kernel/time/timer.c:1768 [inline]
                    run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803
                    __do_softirq+0x29b/0x9c2 kernel/softirq.c:571
                    invoke_softirq kernel/softirq.c:445 [inline]
                    __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
                    irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
                    sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106
                    asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
                    native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
                    arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
                    acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
                    acpi_idle_do_entry+0x1c9/0x240 drivers/acpi/processor_idle.c:554
                    acpi_idle_enter+0x369/0x510 drivers/acpi/processor_idle.c:691
                    cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237
                    cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351
                    call_cpuidle kernel/sched/idle.c:155 [inline]
                    cpuidle_idle_call kernel/sched/idle.c:236 [inline]
                    do_idle+0x3e8/0x590 kernel/sched/idle.c:303
                    cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:400
                    start_secondary+0x21d/0x2b0 arch/x86/kernel/smpboot.c:266
                    secondary_startup_64_no_verify+0xce/0xdb
   INITIAL USE at:
                   lock_acquire kernel/locking/lockdep.c:5665 [inline]
                   lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                   __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
                   _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                   spin_lock include/linux/spinlock.h:349 [inline]
                   evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261
                   evdev_pass_values drivers/input/evdev.c:253 [inline]
                   evdev_events+0x359/0x3e0 drivers/input/evdev.c:306
                   input_to_handler+0x2a0/0x4c0 drivers/input/input.c:126
                   input_pass_values.part.0+0x230/0x710 drivers/input/input.c:156
                   input_pass_values drivers/input/input.c:426 [inline]
                   input_handle_event+0x67e/0x1440 drivers/input/input.c:426
                   input_event drivers/input/input.c:457 [inline]
                   input_event+0x8e/0xb0 drivers/input/input.c:449
                   hidinput_hid_event+0x79d/0x2010 drivers/hid/hid-input.c:1631
                   hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1527
                   hid_input_array_field+0x4d7/0x660 drivers/hid/hid-core.c:1639
                   hid_process_report drivers/hid/hid-core.c:1681 [inline]
                   hid_report_raw_event+0xa8a/0x1280 drivers/hid/hid-core.c:1998
                   hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:2065
                   hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284
                   __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
                   usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747
                   dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988
                   call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474
                   expire_timers kernel/time/timer.c:1519 [inline]
                   __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790
                   __run_timers kernel/time/timer.c:1768 [inline]
                   run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803
                   __do_softirq+0x29b/0x9c2 kernel/softirq.c:571
                   invoke_softirq kernel/softirq.c:445 [inline]
                   __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
                   irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
                   sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106
                   asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
                   native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
                   arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
                   acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
                   acpi_idle_do_entry+0x1c9/0x240 drivers/acpi/processor_idle.c:554
                   acpi_idle_enter+0x369/0x510 drivers/acpi/processor_idle.c:691
                   cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237
                   cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351
                   call_cpuidle kernel/sched/idle.c:155 [inline]
                   cpuidle_idle_call kernel/sched/idle.c:236 [inline]
                   do_idle+0x3e8/0x590 kernel/sched/idle.c:303
                   cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:400
                   start_secondary+0x21d/0x2b0 arch/x86/kernel/smpboot.c:266
                   secondary_startup_64_no_verify+0xce/0xdb
 }
 ... key      at: [<ffffffff9126d400>] __key.3+0x0/0x40

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:5665 [inline]
                        lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                        __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                        _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228
                        do_wait+0x284/0xce0 kernel/exit.c:1508
                        kernel_wait+0x9c/0x150 kernel/exit.c:1698
                        call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                        call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166
                        process_one_work+0x996/0x1610 kernel/workqueue.c:2289
                        worker_thread+0x665/0x1080 kernel/workqueue.c:2436
                        kthread+0x2e9/0x3a0 kernel/kthread.c:376
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
     SOFTIRQ-ON-R at:
                        lock_acquire kernel/locking/lockdep.c:5665 [inline]
                        lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                        __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                        _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228
                        do_wait+0x284/0xce0 kernel/exit.c:1508
                        kernel_wait+0x9c/0x150 kernel/exit.c:1698
                        call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                        call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166
                        process_one_work+0x996/0x1610 kernel/workqueue.c:2289
                        worker_thread+0x665/0x1080 kernel/workqueue.c:2436
                        kthread+0x2e9/0x3a0 kernel/kthread.c:376
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
     INITIAL USE at:
                       lock_acquire kernel/locking/lockdep.c:5665 [inline]
                       lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                       __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                       _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:326
                       copy_process+0x445e/0x7020 kernel/fork.c:2374
                       kernel_clone+0xe7/0xab0 kernel/fork.c:2655
                       user_mode_thread+0xad/0xe0 kernel/fork.c:2724
                       rest_init+0x23/0x270 init/main.c:691
                       arch_call_rest_init+0xf/0x14 init/main.c:882
                       start_kernel+0x46e/0x48f init/main.c:1137
                       secondary_startup_64_no_verify+0xce/0xdb
     INITIAL READ USE at:
                            lock_acquire kernel/locking/lockdep.c:5665 [inline]
                            lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                            __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                            _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228
                            do_wait+0x284/0xce0 kernel/exit.c:1508
                            kernel_wait+0x9c/0x150 kernel/exit.c:1698
                            call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                            call_usermodehelper_exec_work+0xf5/0x180 kernel/umh.c:166
                            process_one_work+0x996/0x1610 kernel/workqueue.c:2289
                            worker_thread+0x665/0x1080 kernel/workqueue.c:2436
                            kthread+0x2e9/0x3a0 kernel/kthread.c:376
                            ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
   }
   ... key      at: [<ffffffff8ba0a098>] tasklist_lock+0x18/0x40
   ... acquired at:
   __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
   _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:228
   send_sigio+0xab/0x380 fs/fcntl.c:791
   kill_fasync_rcu fs/fcntl.c:1002 [inline]
   kill_fasync fs/fcntl.c:1016 [inline]
   kill_fasync+0x1f8/0x470 fs/fcntl.c:1009
   sock_wake_async+0xd2/0x160 net/socket.c:1419
   sk_wake_async include/net/sock.h:2480 [inline]
   sk_wake_async include/net/sock.h:2476 [inline]
   sock_def_readable+0x349/0x4e0 net/core/sock.c:3219
   unix_dgram_sendmsg+0xf69/0x1ad0 net/unix/af_unix.c:2028
   sock_sendmsg_nosec net/socket.c:714 [inline]
   sock_sendmsg+0xcf/0x120 net/socket.c:734
   ____sys_sendmsg+0x334/0x810 net/socket.c:2492
   ___sys_sendmsg+0xf3/0x170 net/socket.c:2546
   __sys_sendmmsg+0x195/0x470 net/socket.c:2632
   __do_sys_sendmmsg net/socket.c:2661 [inline]
   __se_sys_sendmmsg net/socket.c:2658 [inline]
   __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2658
   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+0x46/0xb0

 -> (&f->f_owner.lock){...-}-{2:2} {
    IN-SOFTIRQ-R at:
                      lock_acquire kernel/locking/lockdep.c:5665 [inline]
                      lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                      __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                      _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236
                      send_sigurg+0x1e/0xaf0 fs/fcntl.c:816
                      sk_send_sigurg+0x76/0x310 net/core/sock.c:3275
                      tcp_check_urg net/ipv4/tcp_input.c:5596 [inline]
                      tcp_urg+0x38e/0xb40 net/ipv4/tcp_input.c:5637
                      tcp_rcv_established+0x81d/0x20e0 net/ipv4/tcp_input.c:5984
                      tcp_v6_do_rcv+0x810/0x13c0 net/ipv6/tcp_ipv6.c:1476
                      tcp_v6_rcv+0x2d9b/0x37f0 net/ipv6/tcp_ipv6.c:1735
                      ip6_protocol_deliver_rcu+0x2f9/0x1950 net/ipv6/ip6_input.c:436
                      ip6_input_finish+0x14c/0x2c0 net/ipv6/ip6_input.c:481
                      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:490
                      dst_input include/net/dst.h:461 [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+0x27f/0x3b0 net/ipv6/ip6_input.c:306
                      __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5478
                      __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5592
                      process_backlog+0x3a0/0x7c0 net/core/dev.c:5920
                      __napi_poll+0xb3/0x6e0 net/core/dev.c:6486
                      napi_poll net/core/dev.c:6553 [inline]
                      net_rx_action+0x9c1/0xd90 net/core/dev.c:6664
                      __do_softirq+0x29b/0x9c2 kernel/softirq.c:571
                      run_ksoftirqd kernel/softirq.c:934 [inline]
                      run_ksoftirqd+0x2d/0x60 kernel/softirq.c:926
                      smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164
                      kthread+0x2e9/0x3a0 kernel/kthread.c:376
                      ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
    INITIAL USE at:
                     lock_acquire kernel/locking/lockdep.c:5665 [inline]
                     lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                     _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:326
                     f_modown+0x2a/0x390 fs/fcntl.c:90
                     __f_setown fs/fcntl.c:109 [inline]
                     f_setown+0xd7/0x230 fs/fcntl.c:137
                     sock_ioctl+0x37e/0x640 net/socket.c:1229
                     vfs_ioctl fs/ioctl.c:51 [inline]
                     __do_sys_ioctl fs/ioctl.c:870 [inline]
                     __se_sys_ioctl fs/ioctl.c:856 [inline]
                     __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
                     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+0x46/0xb0
    INITIAL READ USE at:
                          lock_acquire kernel/locking/lockdep.c:5665 [inline]
                          lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                          __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                          _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236
                          send_sigurg+0x1e/0xaf0 fs/fcntl.c:816
                          sk_send_sigurg+0x76/0x310 net/core/sock.c:3275
                          tcp_check_urg net/ipv4/tcp_input.c:5596 [inline]
                          tcp_urg+0x38e/0xb40 net/ipv4/tcp_input.c:5637
                          tcp_rcv_established+0x81d/0x20e0 net/ipv4/tcp_input.c:5984
                          tcp_v6_do_rcv+0x810/0x13c0 net/ipv6/tcp_ipv6.c:1476
                          sk_backlog_rcv include/net/sock.h:1061 [inline]
                          __release_sock+0x134/0x3b0 net/core/sock.c:2849
                          release_sock+0x54/0x1b0 net/core/sock.c:3404
                          sk_stream_wait_memory+0x608/0xed0 net/core/stream.c:145
                          tcp_sendmsg_locked+0x7d5/0x2fd0 net/ipv4/tcp.c:1410
                          tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1448
                          inet6_sendmsg+0x99/0xe0 net/ipv6/af_inet6.c:652
                          sock_sendmsg_nosec net/socket.c:714 [inline]
                          sock_sendmsg+0xcf/0x120 net/socket.c:734
                          __sys_sendto+0x21a/0x320 net/socket.c:2119
                          __do_sys_sendto net/socket.c:2131 [inline]
                          __se_sys_sendto net/socket.c:2127 [inline]
                          __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2127
                          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+0x46/0xb0
  }
  ... key      at: [<ffffffff90fb9440>] __key.5+0x0/0x40
  ... acquired at:
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236
   send_sigio+0x24/0x380 fs/fcntl.c:777
   kill_fasync_rcu fs/fcntl.c:1002 [inline]
   kill_fasync fs/fcntl.c:1016 [inline]
   kill_fasync+0x1f8/0x470 fs/fcntl.c:1009
   sock_wake_async+0xd2/0x160 net/socket.c:1419
   sk_wake_async include/net/sock.h:2480 [inline]
   sk_wake_async include/net/sock.h:2476 [inline]
   sock_def_readable+0x349/0x4e0 net/core/sock.c:3219
   unix_dgram_sendmsg+0xf69/0x1ad0 net/unix/af_unix.c:2028
   sock_sendmsg_nosec net/socket.c:714 [inline]
   sock_sendmsg+0xcf/0x120 net/socket.c:734
   ____sys_sendmsg+0x334/0x810 net/socket.c:2492
   ___sys_sendmsg+0xf3/0x170 net/socket.c:2546
   __sys_sendmmsg+0x195/0x470 net/socket.c:2632
   __do_sys_sendmmsg net/socket.c:2661 [inline]
   __se_sys_sendmmsg net/socket.c:2658 [inline]
   __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2658
   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+0x46/0xb0

-> (&new->fa_lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire kernel/locking/lockdep.c:5665 [inline]
                   lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0x32/0x50 kernel/locking/spinlock.c:326
                   fasync_remove_entry+0xb6/0x1e0 fs/fcntl.c:872
                   fasync_helper+0x9e/0xb0 fs/fcntl.c:975
                   sock_fasync+0x94/0x140 net/socket.c:1390
                   __fput+0x834/0x9d0 fs/file_table.c:314
                   task_work_run+0xdd/0x1a0 kernel/task_work.c:177
                   resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
                   exit_to_user_mode_loop kernel/entry/common.c:169 [inline]
                   exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201
                   __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
                   syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294
                   do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
                   entry_SYSCALL_64_after_hwframe+0x46/0xb0
   INITIAL READ USE at:
                        lock_acquire kernel/locking/lockdep.c:5665 [inline]
                        lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236
                        kill_fasync_rcu fs/fcntl.c:995 [inline]
                        kill_fasync fs/fcntl.c:1016 [inline]
                        kill_fasync+0x136/0x470 fs/fcntl.c:1009
                        sock_wake_async+0xd2/0x160 net/socket.c:1419
                        sk_wake_async include/net/sock.h:2480 [inline]
                        sk_wake_async include/net/sock.h:2476 [inline]
                        sock_def_readable+0x349/0x4e0 net/core/sock.c:3219
                        unix_dgram_sendmsg+0xf69/0x1ad0 net/unix/af_unix.c:2028
                        sock_sendmsg_nosec net/socket.c:714 [inline]
                        sock_sendmsg+0xcf/0x120 net/socket.c:734
                        ____sys_sendmsg+0x334/0x810 net/socket.c:2492
                        ___sys_sendmsg+0xf3/0x170 net/socket.c:2546
                        __sys_sendmmsg+0x195/0x470 net/socket.c:2632
                        __do_sys_sendmmsg net/socket.c:2661 [inline]
                        __se_sys_sendmmsg net/socket.c:2658 [inline]
                        __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2658
                        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+0x46/0xb0
 }
 ... key      at: [<ffffffff90fba220>] __key.0+0x0/0x40
 ... acquired at:
   lock_acquire kernel/locking/lockdep.c:5665 [inline]
   lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:995 [inline]
   kill_fasync fs/fcntl.c:1016 [inline]
   kill_fasync+0x136/0x470 fs/fcntl.c:1009
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values.part.0+0x64e/0x970 drivers/input/evdev.c:278
   evdev_pass_values drivers/input/evdev.c:253 [inline]
   evdev_events+0x359/0x3e0 drivers/input/evdev.c:306
   input_to_handler+0x2a0/0x4c0 drivers/input/input.c:126
   input_pass_values.part.0+0x230/0x710 drivers/input/input.c:156
   input_pass_values drivers/input/input.c:145 [inline]
   input_handle_event+0x373/0x1440 drivers/input/input.c:415
   input_inject_event+0x1bd/0x320 drivers/input/input.c:487
   evdev_write+0x430/0x760 drivers/input/evdev.c:530
   vfs_write+0x269/0xac0 fs/read_write.c:589
   ksys_write+0x1e8/0x250 fs/read_write.c:644
   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+0x46/0xb0


stack backtrace:
CPU: 0 PID: 12819 Comm: syz-executor.3 Not tainted 5.19.0-rc1-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:2609 [inline]
 check_irq_usage.cold+0x4c1/0x6b0 kernel/locking/lockdep.c:2848
 check_prev_add kernel/locking/lockdep.c:3099 [inline]
 check_prevs_add kernel/locking/lockdep.c:3214 [inline]
 validate_chain kernel/locking/lockdep.c:3829 [inline]
 __lock_acquire+0x2ad6/0x5660 kernel/locking/lockdep.c:5053
 lock_acquire kernel/locking/lockdep.c:5665 [inline]
 lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
 _raw_read_lock_irqsave+0x70/0x90 kernel/locking/spinlock.c:236
 kill_fasync_rcu fs/fcntl.c:995 [inline]
 kill_fasync fs/fcntl.c:1016 [inline]
 kill_fasync+0x136/0x470 fs/fcntl.c:1009
 __pass_event drivers/input/evdev.c:240 [inline]
 evdev_pass_values.part.0+0x64e/0x970 drivers/input/evdev.c:278
 evdev_pass_values drivers/input/evdev.c:253 [inline]
 evdev_events+0x359/0x3e0 drivers/input/evdev.c:306
 input_to_handler+0x2a0/0x4c0 drivers/input/input.c:126
 input_pass_values.part.0+0x230/0x710 drivers/input/input.c:156
 input_pass_values drivers/input/input.c:145 [inline]
 input_handle_event+0x373/0x1440 drivers/input/input.c:415
 input_inject_event+0x1bd/0x320 drivers/input/input.c:487
 evdev_write+0x430/0x760 drivers/input/evdev.c:530
 vfs_write+0x269/0xac0 fs/read_write.c:589
 ksys_write+0x1e8/0x250 fs/read_write.c:644
 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+0x46/0xb0
RIP: 0033:0x7f1565689109
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f156672e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f156579bf60 RCX: 00007f1565689109
RDX: 0000000000003888 RSI: 0000000020000080 RDI: 0000000000000004
RBP: 00007f15656e308d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe6161ed8f R14: 00007f156672e300 R15: 0000000000022000
 </TASK>

Crashes (133):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/06/06 15:51 upstream f2906aa86338 c8857892 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/06/02 15:44 upstream d1dc87763f40 5783034f .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-selinux-root 2022/05/15 14:50 upstream bc403203d65a 744a39e2 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-selinux-root 2022/05/14 09:14 upstream ec7f49619d8e 744a39e2 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/05/13 12:22 upstream f3f19f939c11 107f6434 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/05/09 01:11 upstream c5eb0a61238d e60b1103 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/05/03 11:48 upstream 9050ba3a61a4 7ee63e2c .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/29 16:56 upstream 38d741cb70b3 44a5ca63 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/29 04:36 upstream 259b897e5a79 e9076525 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/28 20:20 upstream 259b897e5a79 e9076525 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/28 16:21 upstream 8f4dd16603ce e9076525 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/28 00:43 upstream 8f4dd16603ce 8a1f1f07 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/27 23:16 upstream 8f4dd16603ce 8a1f1f07 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/27 09:37 upstream 46cf2c613f4b 1fa34c1b .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/26 09:18 upstream d615b5416f8a 1fa34c1b .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/26 08:06 upstream d615b5416f8a 1fa34c1b .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/25 21:47 upstream d615b5416f8a 152baedd .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/23 19:30 upstream 13bc32bad705 131df97d .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/22 17:10 upstream d569e86915b7 131df97d .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/22 15:48 upstream d569e86915b7 131df97d .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/22 13:37 upstream d569e86915b7 2738b391 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/22 00:20 upstream 59f0c2447e25 2738b391 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/21 17:25 upstream b253435746d9 2738b391 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/04/21 03:32 upstream b253435746d9 d4befee1 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/04/20 12:47 upstream 559089e0a93d 160a3f31 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/19 20:24 upstream b7f73403a3e9 c334415e .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/04/17 10:43 upstream a2c29ccd9477 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-root 2022/04/16 02:31 upstream 59250f8a7f3a 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/04/16 00:16 upstream 59250f8a7f3a 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-root 2022/04/15 12:53 upstream 028192fea1de 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/04/15 11:20 upstream 028192fea1de 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/15 08:49 upstream 028192fea1de b17b2923 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-smack-root 2022/04/14 22:42 upstream b9b4c79e5830 b17b2923 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/14 20:55 upstream b9b4c79e5830 b17b2923 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/13 04:33 upstream a19944809fe9 dacb3f1c .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/12 11:41 upstream ce522ba9ef7e af01ee7d .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2022/04/10 19:52 upstream 4ea3c6425269 e22c3da3 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/22 03:46 upstream 59f0c2447e25 2738b391 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/21 18:30 upstream b253435746d9 2738b391 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/20 15:09 upstream 559089e0a93d 160a3f31 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/20 03:16 upstream b7f73403a3e9 7d7bc738 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/20 00:45 upstream b7f73403a3e9 7d7bc738 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/19 13:31 upstream b2d229d4ddb1 c334415e .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/18 05:00 upstream b2d229d4ddb1 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/18 01:28 upstream b2d229d4ddb1 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce-386 2022/04/15 01:41 upstream b9b4c79e5830 b17b2923 .config log report info possible deadlock in evdev_pass_values
ci-upstream-linux-next-kasan-gce-root 2022/06/06 05:30 linux-next 40b58e42584b c8857892 .config log report info possible deadlock in evdev_pass_values
ci-upstream-linux-next-kasan-gce-root 2022/06/03 16:41 linux-next 1cfd968b58a1 eee80d3c .config log report info possible deadlock in evdev_pass_values
ci-upstream-linux-next-kasan-gce-root 2022/04/19 09:22 linux-next 634de1db0e9b 8bcc32a6 .config log report info possible deadlock in evdev_pass_values
ci-upstream-kasan-gce 2021/01/06 03:00 upstream 6207214a70bf b1c228e1 .config log report info
ci-upstream-kasan-gce 2021/01/05 11:44 upstream 36bbbd0e234d a0234d98 .config log report info
ci-upstream-kasan-gce-386 2021/01/09 01:30 upstream 6279d812eab6 c104d4a3 .config log report info