===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 5.15.154-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.2/7390 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffff0000e905d0c0 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1014 [inline] ffff0000e905d0c0 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x190/0x48c fs/fcntl.c:1035 and this task is already holding: ffff0000d61ea028 (&client->buffer_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff0000d61ea028 (&client->buffer_lock){....}-{2:2}, at: evdev_pass_values+0xe0/0x780 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: (&dev->event_lock#2){..-.}-{2:2} ... which became SOFTIRQ-irq-safe at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xc4/0x14c kernel/locking/spinlock.c:162 input_event+0xa0/0xe4 drivers/input/input.c:456 hidinput_hid_event+0xd9c/0x1460 drivers/hid/hid-input.c:1465 hid_process_event+0x3e0/0x528 drivers/hid/hid-core.c:1539 hid_input_field drivers/hid/hid-core.c:1583 [inline] hid_report_raw_event+0xc68/0x12e4 drivers/hid/hid-core.c:1807 hid_input_report+0x3ac/0x480 drivers/hid/hid-core.c:1874 hid_irq_in+0x3fc/0x708 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x2e0/0x518 drivers/usb/core/hcd.c:1674 usb_hcd_giveback_urb+0x108/0x41c drivers/usb/core/hcd.c:1757 dummy_timer+0x66c/0x26cc drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x554/0x718 kernel/time/timer.c:1767 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780 __do_softirq+0x344/0xdb0 kernel/softirq.c:558 do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] invoke_softirq kernel/softirq.c:439 [inline] __irq_exit_rcu+0x264/0x4d4 kernel/softirq.c:637 irq_exit+0x14/0x88 kernel/softirq.c:661 handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:710 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:758 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899 do_interrupt_handler+0x74/0x94 arch/arm64/kernel/entry-common.c:267 el1_interrupt+0x30/0x58 arch/arm64/kernel/entry-common.c:454 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:470 el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:580 arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline] rmqueue_pcplist mm/page_alloc.c:3663 [inline] rmqueue mm/page_alloc.c:3690 [inline] get_page_from_freelist+0x794/0x2cd0 mm/page_alloc.c:4156 __alloc_pages+0x20c/0x674 mm/page_alloc.c:5423 alloc_pages_vma+0x294/0x7c0 mm/mempolicy.c:2146 alloc_zeroed_user_highpage_movable+0x9c/0xd8 arch/arm64/mm/fault.c:932 do_anonymous_page mm/memory.c:3808 [inline] handle_pte_fault mm/memory.c:4619 [inline] __handle_mm_fault mm/memory.c:4756 [inline] handle_mm_fault+0x1f0c/0x3424 mm/memory.c:4854 faultin_page mm/gup.c:976 [inline] __get_user_pages+0x39c/0x92c mm/gup.c:1197 populate_vma_page_range+0x200/0x290 mm/gup.c:1529 __mm_populate+0x278/0x41c mm/gup.c:1638 mm_populate include/linux/mm.h:2632 [inline] __do_sys_mlockall mm/mlock.c:799 [inline] __se_sys_mlockall mm/mlock.c:775 [inline] __arm64_sys_mlockall+0x2f0/0x384 mm/mlock.c:775 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 to a SOFTIRQ-irq-unsafe lock: (tasklist_lock){.+.+}-{2:2} ... which became SOFTIRQ-irq-unsafe at: ... lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x104/0x1a0 kernel/locking/spinlock.c:228 do_wait+0x290/0xac8 kernel/exit.c:1576 kernel_wait+0xe0/0x20c kernel/exit.c:1766 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xd0/0x248 kernel/umh.c:166 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 other info that might help us debug this: Chain exists of: &dev->event_lock#2 --> &client->buffer_lock --> tasklist_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(tasklist_lock); local_irq_disable(); lock(&dev->event_lock#2); lock(&client->buffer_lock); lock(&dev->event_lock#2); *** DEADLOCK *** 7 locks held by syz-executor.2/7390: #0: ffff0000cfe7b110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_write+0x158/0x45c drivers/input/evdev.c:513 #1: ffff0000c83e0230 (&dev->event_lock#2){..-.}-{2:2}, at: input_inject_event+0xc0/0x304 drivers/input/input.c:482 #2: ffff800014b114e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #3: ffff800014b114e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #4: ffff800014b114e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #5: ffff0000d61ea028 (&client->buffer_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #5: ffff0000d61ea028 (&client->buffer_lock){....}-{2:2}, at: evdev_pass_values+0xe0/0x780 drivers/input/evdev.c:261 #6: ffff800014b114e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 the dependencies between SOFTIRQ-irq-safe lock and the holding lock: -> (&dev->event_lock#2){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xc4/0x14c kernel/locking/spinlock.c:162 input_event+0xa0/0xe4 drivers/input/input.c:456 hidinput_hid_event+0xd9c/0x1460 drivers/hid/hid-input.c:1465 hid_process_event+0x3e0/0x528 drivers/hid/hid-core.c:1539 hid_input_field drivers/hid/hid-core.c:1583 [inline] hid_report_raw_event+0xc68/0x12e4 drivers/hid/hid-core.c:1807 hid_input_report+0x3ac/0x480 drivers/hid/hid-core.c:1874 hid_irq_in+0x3fc/0x708 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x2e0/0x518 drivers/usb/core/hcd.c:1674 usb_hcd_giveback_urb+0x108/0x41c drivers/usb/core/hcd.c:1757 dummy_timer+0x66c/0x26cc drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x554/0x718 kernel/time/timer.c:1767 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780 __do_softirq+0x344/0xdb0 kernel/softirq.c:558 do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] invoke_softirq kernel/softirq.c:439 [inline] __irq_exit_rcu+0x264/0x4d4 kernel/softirq.c:637 irq_exit+0x14/0x88 kernel/softirq.c:661 handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:710 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:758 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899 do_interrupt_handler+0x74/0x94 arch/arm64/kernel/entry-common.c:267 el1_interrupt+0x30/0x58 arch/arm64/kernel/entry-common.c:454 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:470 el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:580 arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline] rmqueue_pcplist mm/page_alloc.c:3663 [inline] rmqueue mm/page_alloc.c:3690 [inline] get_page_from_freelist+0x794/0x2cd0 mm/page_alloc.c:4156 __alloc_pages+0x20c/0x674 mm/page_alloc.c:5423 alloc_pages_vma+0x294/0x7c0 mm/mempolicy.c:2146 alloc_zeroed_user_highpage_movable+0x9c/0xd8 arch/arm64/mm/fault.c:932 do_anonymous_page mm/memory.c:3808 [inline] handle_pte_fault mm/memory.c:4619 [inline] __handle_mm_fault mm/memory.c:4756 [inline] handle_mm_fault+0x1f0c/0x3424 mm/memory.c:4854 faultin_page mm/gup.c:976 [inline] __get_user_pages+0x39c/0x92c mm/gup.c:1197 populate_vma_page_range+0x200/0x290 mm/gup.c:1529 __mm_populate+0x278/0x41c mm/gup.c:1638 mm_populate include/linux/mm.h:2632 [inline] __do_sys_mlockall mm/mlock.c:799 [inline] __se_sys_mlockall mm/mlock.c:775 [inline] __arm64_sys_mlockall+0x2f0/0x384 mm/mlock.c:775 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0xcc/0x13c kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:388 [inline] input_disconnect_device drivers/input/input.c:752 [inline] __input_unregister_device+0x68/0x304 drivers/input/input.c:2203 input_unregister_device+0xb0/0xfc drivers/input/input.c:2398 uinput_destroy_device+0x5a4/0x79c drivers/input/misc/uinput.c:298 uinput_release+0x44/0x60 drivers/input/misc/uinput.c:710 __fput+0x30c/0x7f0 fs/file_table.c:280 ____fput+0x20/0x30 fs/file_table.c:308 task_work_run+0x130/0x1e4 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 } ... key at: [] input_allocate_device.__key.6+0x0/0x20 -> (&client->buffer_lock){....}-{2:2} { INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xc4/0x14c kernel/locking/spinlock.c:162 evdev_set_mask drivers/input/evdev.c:980 [inline] evdev_do_ioctl drivers/input/evdev.c:1117 [inline] evdev_ioctl_handler+0x26e4/0x3174 drivers/input/evdev.c:1272 evdev_ioctl+0x38/0x4c drivers/input/evdev.c:1281 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 } ... key at: [] evdev_open.__key.22+0x0/0x20 ... acquired at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] evdev_pass_values+0xe0/0x780 drivers/input/evdev.c:261 evdev_events+0x1b0/0x2f4 drivers/input/evdev.c:306 input_to_handler drivers/input/input.c:126 [inline] input_pass_values+0x690/0xe10 drivers/input/input.c:156 input_handle_event+0xaa4/0x1254 drivers/input/input.c:415 input_inject_event+0x1e4/0x304 drivers/input/input.c:487 evdev_write+0x2fc/0x45c drivers/input/evdev.c:530 vfs_write+0x280/0xb3c fs/read_write.c:592 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock: -> (tasklist_lock){.+.+}-{2:2} { HARDIRQ-ON-R at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x104/0x1a0 kernel/locking/spinlock.c:228 do_wait+0x290/0xac8 kernel/exit.c:1576 kernel_wait+0xe0/0x20c kernel/exit.c:1766 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xd0/0x248 kernel/umh.c:166 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 SOFTIRQ-ON-R at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x104/0x1a0 kernel/locking/spinlock.c:228 do_wait+0x290/0xac8 kernel/exit.c:1576 kernel_wait+0xe0/0x20c kernel/exit.c:1766 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xd0/0x248 kernel/umh.c:166 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0xcc/0x13c kernel/locking/spinlock.c:316 copy_process+0x253c/0x3750 kernel/fork.c:2337 kernel_clone+0x1d8/0xa58 kernel/fork.c:2604 kernel_thread+0x148/0x1bc kernel/fork.c:2656 rest_init+0x2c/0x38c init/main.c:704 arch_call_rest_init+0x14/0x20 init/main.c:891 start_kernel+0x440/0x600 init/main.c:1138 __primary_switched+0xa8/0xb0 arch/arm64/kernel/head.S:468 INITIAL READ USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x104/0x1a0 kernel/locking/spinlock.c:228 do_wait+0x290/0xac8 kernel/exit.c:1576 kernel_wait+0xe0/0x20c kernel/exit.c:1766 call_usermodehelper_exec_sync kernel/umh.c:139 [inline] call_usermodehelper_exec_work+0xd0/0x248 kernel/umh.c:166 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 } ... key at: [] tasklist_lock+0x18/0x40 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x104/0x1a0 kernel/locking/spinlock.c:228 send_sigurg+0xc8/0x38c fs/fcntl.c:851 sk_send_sigurg+0x6c/0xc0 net/core/sock.c:3128 tcp_check_urg net/ipv4/tcp_input.c:5609 [inline] tcp_urg+0x234/0x8f4 net/ipv4/tcp_input.c:5650 tcp_rcv_established+0xa4c/0x1f40 net/ipv4/tcp_input.c:5984 tcp_v6_do_rcv+0x434/0x1360 net/ipv6/tcp_ipv6.c:1526 sk_backlog_rcv include/net/sock.h:1059 [inline] __release_sock+0x1a8/0x408 net/core/sock.c:2724 release_sock+0x68/0x270 net/core/sock.c:3265 tcp_sendmsg+0x4c/0x64 net/ipv4/tcp.c:1457 inet6_sendmsg+0xb4/0xd8 net/ipv6/af_inet6.c:660 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x388/0x4d0 net/socket.c:2058 __do_sys_sendto net/socket.c:2070 [inline] __se_sys_sendto net/socket.c:2066 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2066 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> (&f->f_owner.lock){....}-{2:2} { INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0xcc/0x13c kernel/locking/spinlock.c:316 f_modown+0x44/0x2e4 fs/fcntl.c:91 __f_setown+0x44/0x58 fs/fcntl.c:110 fcntl_dirnotify+0x5d8/0x7c0 fs/notify/dnotify/dnotify.c:351 do_fcntl+0x5a4/0x1d54 fs/fcntl.c:422 __do_sys_fcntl fs/fcntl.c:472 [inline] __se_sys_fcntl fs/fcntl.c:457 [inline] __arm64_sys_fcntl+0x110/0x1f8 fs/fcntl.c:457 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 INITIAL READ USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x138/0x1e8 kernel/locking/spinlock.c:236 send_sigio+0x40/0x33c fs/fcntl.c:796 dnotify_handle_event+0x118/0x3ac 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+0x1818/0x1cd4 fs/notify/fsnotify.c:570 fsnotify_parent include/linux/fsnotify.h:80 [inline] fsnotify_file include/linux/fsnotify.h:99 [inline] fsnotify_access include/linux/fsnotify.h:309 [inline] do_iter_read+0x530/0x67c fs/read_write.c:795 vfs_readv fs/read_write.c:910 [inline] do_readv+0x218/0x3dc fs/read_write.c:947 __do_sys_readv fs/read_write.c:1038 [inline] __se_sys_readv fs/read_write.c:1035 [inline] __arm64_sys_readv+0x80/0x94 fs/read_write.c:1035 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 } ... key at: [] __alloc_file.__key+0x0/0x10 ... acquired at: __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x138/0x1e8 kernel/locking/spinlock.c:236 send_sigio+0x40/0x33c fs/fcntl.c:796 kill_fasync_rcu fs/fcntl.c:1021 [inline] kill_fasync+0x214/0x48c fs/fcntl.c:1035 sock_wake_async+0x150/0x1a8 sk_wake_async+0x160/0x26c include/net/sock.h:2459 unix_write_space+0x224/0x34c net/unix/af_unix.c:474 sock_wfree+0x110/0x230 net/core/sock.c:2227 unix_destruct_scm+0x26c/0x2d8 net/unix/scm.c:150 skb_release_head_state+0x108/0x2a0 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] kfree_skb_reason+0x1ac/0x46c net/core/skbuff.c:776 kfree_skb include/linux/skbuff.h:1123 [inline] skb_queue_purge+0x124/0x1a4 net/core/skbuff.c:3289 unix_dgram_disconnected net/unix/af_unix.c:486 [inline] unix_dgram_connect+0x754/0xcdc net/unix/af_unix.c:1281 __sys_connect_file net/socket.c:1918 [inline] __sys_connect+0x268/0x290 net/socket.c:1935 __do_sys_connect net/socket.c:1945 [inline] __se_sys_connect net/socket.c:1942 [inline] __arm64_sys_connect+0x7c/0x94 net/socket.c:1942 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> (&new->fa_lock){....}-{2:2} { INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline] _raw_write_lock_irq+0xcc/0x13c kernel/locking/spinlock.c:316 fasync_remove_entry+0x108/0x1d8 fs/fcntl.c:891 fasync_helper+0x94/0xc4 fs/fcntl.c:994 evdev_fasync+0x58/0x6c drivers/input/evdev.c:326 __fput+0x620/0x7f0 fs/file_table.c:277 ____fput+0x20/0x30 fs/file_table.c:308 task_work_run+0x130/0x1e4 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 INITIAL READ USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x138/0x1e8 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:1014 [inline] kill_fasync+0x190/0x48c fs/fcntl.c:1035 sock_wake_async+0x150/0x1a8 sk_wake_async+0x160/0x26c include/net/sock.h:2459 unix_write_space+0x224/0x34c net/unix/af_unix.c:474 sock_wfree+0x110/0x230 net/core/sock.c:2227 unix_destruct_scm+0x26c/0x2d8 net/unix/scm.c:150 skb_release_head_state+0x108/0x2a0 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] kfree_skb_reason+0x1ac/0x46c net/core/skbuff.c:776 kfree_skb include/linux/skbuff.h:1123 [inline] skb_queue_purge+0x124/0x1a4 net/core/skbuff.c:3289 unix_dgram_disconnected net/unix/af_unix.c:486 [inline] unix_dgram_connect+0x754/0xcdc net/unix/af_unix.c:1281 __sys_connect_file net/socket.c:1918 [inline] __sys_connect+0x268/0x290 net/socket.c:1935 __do_sys_connect net/socket.c:1945 [inline] __se_sys_connect net/socket.c:1942 [inline] __arm64_sys_connect+0x7c/0x94 net/socket.c:1942 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 } ... key at: [] fasync_insert_entry.__key+0x0/0x20 ... acquired at: __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x138/0x1e8 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:1014 [inline] kill_fasync+0x190/0x48c fs/fcntl.c:1035 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x460/0x780 drivers/input/evdev.c:278 evdev_events+0x1b0/0x2f4 drivers/input/evdev.c:306 input_to_handler drivers/input/input.c:126 [inline] input_pass_values+0x690/0xe10 drivers/input/input.c:156 input_handle_event+0xaa4/0x1254 drivers/input/input.c:415 input_inject_event+0x1e4/0x304 drivers/input/input.c:487 evdev_write+0x2fc/0x45c drivers/input/evdev.c:530 vfs_write+0x280/0xb3c fs/read_write.c:592 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 stack backtrace: CPU: 1 PID: 7390 Comm: syz-executor.2 Not tainted 5.15.154-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 __lock_acquire+0x62bc/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline] _raw_read_lock_irqsave+0x138/0x1e8 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:1014 [inline] kill_fasync+0x190/0x48c fs/fcntl.c:1035 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x460/0x780 drivers/input/evdev.c:278 evdev_events+0x1b0/0x2f4 drivers/input/evdev.c:306 input_to_handler drivers/input/input.c:126 [inline] input_pass_values+0x690/0xe10 drivers/input/input.c:156 input_handle_event+0xaa4/0x1254 drivers/input/input.c:415 input_inject_event+0x1e4/0x304 drivers/input/input.c:487 evdev_write+0x2fc/0x45c drivers/input/evdev.c:530 vfs_write+0x280/0xb3c fs/read_write.c:592 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584