[v6.1] possible deadlock in evdev_pass_values (3)

0 views
Skip to first unread message

syzbot

unread,
Mar 28, 2024, 5:07:34 PMMar 28
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e5cd595e23c1 Linux 6.1.83
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=103578b5180000
kernel config: https://syzkaller.appspot.com/x/.config?x=99d0cbbc2b2c7cfd
dashboard link: https://syzkaller.appspot.com/bug?extid=24b102734939bf00567f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/cd28292a2eef/disk-e5cd595e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e8297fd856b2/vmlinux-e5cd595e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ea8c74634429/bzImage-e5cd595e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+24b102...@syzkaller.appspotmail.com

=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
6.1.83-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor.1/24310 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff8880745dd4b0 (&new->fa_lock){...-}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:994 [inline]
ffff8880745dd4b0 (&new->fa_lock){...-}-{2:2}, at: kill_fasync+0x196/0x4d0 fs/fcntl.c:1015

and this task is already holding:
ffff88807a9ed028 (&client->buffer_lock){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff88807a9ed028 (&client->buffer_lock){..-.}-{2:2}, at: evdev_pass_values+0xee/0xad0 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+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__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:351 [inline]
evdev_pass_values+0xee/0xad0 drivers/input/evdev.c:261
evdev_events+0x1be/0x2f0 drivers/input/evdev.c:306
input_to_handler drivers/input/input.c:127 [inline]
input_pass_values+0x8e0/0x12a0 drivers/input/input.c:159
input_event_dispose+0x3fc/0x650 drivers/input/input.c:385
input_handle_event+0x97d/0xb00 drivers/input/input.c:402
input_event+0xa0/0xd0 drivers/input/input.c:431
hidinput_hid_event+0x13de/0x1d30 drivers/hid/hid-input.c:1706
hid_process_event+0x433/0x580 drivers/hid/hid-core.c:1544
hid_process_report drivers/hid/hid-core.c:1692 [inline]
hid_report_raw_event+0xfd5/0x17e0 drivers/hid/hid-core.c:2019
hid_input_report+0x420/0x4e0 drivers/hid/hid-core.c:2087
hid_irq_in+0x45c/0x690 drivers/hid/usbhid/hid-core.c:284
__usb_hcd_giveback_urb+0x371/0x530 drivers/usb/core/hcd.c:1675
dummy_timer+0x8ad/0x3200 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1790
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
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:112 [inline]
acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:572
acpi_idle_enter+0x352/0x4f0 drivers/acpi/processor_idle.c:709
cpuidle_enter_state+0x516/0xf80 drivers/cpuidle/cpuidle.c:239
cpuidle_enter+0x59/0x90 drivers/cpuidle/cpuidle.c:356
call_cpuidle kernel/sched/idle.c:155 [inline]
cpuidle_idle_call kernel/sched/idle.c:236 [inline]
do_idle+0x3ce/0x680 kernel/sched/idle.c:303
cpu_startup_entry+0x3d/0x60 kernel/sched/idle.c:401
rest_init+0x2da/0x300 init/main.c:732
start_kernel+0x0/0x53f init/main.c:892
start_kernel+0x496/0x53f init/main.c:1139
secondary_startup_64_no_verify+0xcf/0xdb

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

... which became SOFTIRQ-irq-unsafe at:
...
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
_raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
do_wait+0x2c6/0xb80 kernel/exit.c:1602
kernel_wait+0xe5/0x230 kernel/exit.c:1792
call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307

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.1/24310:
#0: ffff888145749110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_write+0x26d/0x7c0 drivers/input/evdev.c:513
#1: ffff8881466e5230 (&dev->event_lock#2){-.-.}-{2:2}, at: input_inject_event+0xc1/0x330 drivers/input/input.c:456
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#2: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: input_inject_event+0xd1/0x330 drivers/input/input.c:458
#3: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#3: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#3: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: input_pass_values+0xa3/0x12a0 drivers/input/input.c:151
#4: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#4: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#4: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: evdev_events+0x6b/0x2f0 drivers/input/evdev.c:298
#5: ffff88807a9ed028 (&client->buffer_lock){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#5: ffff88807a9ed028 (&client->buffer_lock){..-.}-{2:2}, at: evdev_pass_values+0xee/0xad0 drivers/input/evdev.c:261
#6: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#6: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#6: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x51/0x4d0 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+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__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:351 [inline]
evdev_pass_values+0xee/0xad0 drivers/input/evdev.c:261
evdev_events+0x1be/0x2f0 drivers/input/evdev.c:306
input_to_handler drivers/input/input.c:127 [inline]
input_pass_values+0x8e0/0x12a0 drivers/input/input.c:159
input_event_dispose+0x3fc/0x650 drivers/input/input.c:385
input_handle_event+0x97d/0xb00 drivers/input/input.c:402
input_event+0xa0/0xd0 drivers/input/input.c:431
hidinput_hid_event+0x13de/0x1d30 drivers/hid/hid-input.c:1706
hid_process_event+0x433/0x580 drivers/hid/hid-core.c:1544
hid_process_report drivers/hid/hid-core.c:1692 [inline]
hid_report_raw_event+0xfd5/0x17e0 drivers/hid/hid-core.c:2019
hid_input_report+0x420/0x4e0 drivers/hid/hid-core.c:2087
hid_irq_in+0x45c/0x690 drivers/hid/usbhid/hid-core.c:284
__usb_hcd_giveback_urb+0x371/0x530 drivers/usb/core/hcd.c:1675
dummy_timer+0x8ad/0x3200 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1790
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
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:112 [inline]
acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:572
acpi_idle_enter+0x352/0x4f0 drivers/acpi/processor_idle.c:709
cpuidle_enter_state+0x516/0xf80 drivers/cpuidle/cpuidle.c:239
cpuidle_enter+0x59/0x90 drivers/cpuidle/cpuidle.c:356
call_cpuidle kernel/sched/idle.c:155 [inline]
cpuidle_idle_call kernel/sched/idle.c:236 [inline]
do_idle+0x3ce/0x680 kernel/sched/idle.c:303
cpu_startup_entry+0x3d/0x60 kernel/sched/idle.c:401
rest_init+0x2da/0x300 init/main.c:732
start_kernel+0x0/0x53f init/main.c:892
start_kernel+0x496/0x53f init/main.c:1139
secondary_startup_64_no_verify+0xcf/0xdb
INITIAL USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
_raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
spin_lock_irq include/linux/spinlock.h:376 [inline]
evdev_fetch_next_event drivers/input/evdev.c:545 [inline]
evdev_read+0x532/0xe00 drivers/input/evdev.c:586
do_iter_read+0x4fc/0xc70 fs/read_write.c:798
vfs_readv fs/read_write.c:916 [inline]
do_readv+0x26b/0x460 fs/read_write.c:953
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
}
... key at: [<ffffffff92052640>] evdev_open.__key.25+0x0/0x20

the dependencies between the lock to be acquired
and SOFTIRQ-irq-unsafe lock:
-> (tasklist_lock){.+.+}-{2:2} {
HARDIRQ-ON-R at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
_raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
do_wait+0x2c6/0xb80 kernel/exit.c:1602
kernel_wait+0xe5/0x230 kernel/exit.c:1792
call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
SOFTIRQ-ON-R at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
_raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
do_wait+0x2c6/0xb80 kernel/exit.c:1602
kernel_wait+0xe5/0x230 kernel/exit.c:1792
call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
INITIAL USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
_raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:326
copy_process+0x24b6/0x4060 kernel/fork.c:2401
kernel_clone+0x222/0x920 kernel/fork.c:2682
user_mode_thread+0x12e/0x190 kernel/fork.c:2758
rest_init+0x23/0x300 init/main.c:697
start_kernel+0x0/0x53f init/main.c:892
start_kernel+0x496/0x53f init/main.c:1139
secondary_startup_64_no_verify+0xcf/0xdb
INITIAL READ USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
_raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
do_wait+0x2c6/0xb80 kernel/exit.c:1602
kernel_wait+0xe5/0x230 kernel/exit.c:1792
call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
}
... key at: [<ffffffff8ce0a058>] tasklist_lock+0x18/0x40
... acquired at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
_raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
send_sigio+0xf8/0x360 fs/fcntl.c:790
dnotify_handle_event+0x138/0x440 fs/notify/dnotify/dnotify.c:115
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+0x1c13/0x2470 fs/notify/fsnotify.c:570
fsnotify_name include/linux/fsnotify.h:36 [inline]
fsnotify_delete include/linux/fsnotify.h:243 [inline]
d_delete_notify include/linux/fsnotify.h:260 [inline]
vfs_rmdir+0x321/0x4b0 fs/namei.c:4206
do_rmdir+0x3a2/0x590 fs/namei.c:4254
__do_sys_unlinkat fs/namei.c:4434 [inline]
__se_sys_unlinkat fs/namei.c:4428 [inline]
__x64_sys_unlinkat+0xdc/0xf0 fs/namei.c:4428
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> (&f->f_owner.lock){...-}-{2:2} {
IN-SOFTIRQ-R at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
send_sigurg+0x25/0x3b0 fs/fcntl.c:815
sk_send_sigurg+0x6a/0xb0 net/core/sock.c:3362
tcp_check_urg+0x202/0x740 net/ipv4/tcp_input.c:5637
tcp_urg+0x154/0x440 net/ipv4/tcp_input.c:5678
tcp_rcv_state_process+0x247d/0x4510 net/ipv4/tcp_input.c:6672
tcp_v6_do_rcv+0x91c/0x1270 net/ipv6/tcp_ipv6.c:1514
tcp_v6_rcv+0x234e/0x2b60 net/ipv6/tcp_ipv6.c:1753
ip6_protocol_deliver_rcu+0xaf7/0x1300 net/ipv6/ip6_input.c:438
ip6_input_finish+0x183/0x2c0 net/ipv6/ip6_input.c:483
NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302
NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302
__netif_receive_skb_one_core net/core/dev.c:5528 [inline]
__netif_receive_skb+0x1c6/0x530 net/core/dev.c:5642
process_backlog+0x381/0x760 net/core/dev.c:5970
__napi_poll+0xc7/0x470 net/core/dev.c:6537
napi_poll net/core/dev.c:6604 [inline]
net_rx_action+0x70f/0xeb0 net/core/dev.c:6718
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
run_ksoftirqd+0xc1/0x120 kernel/softirq.c:934
smpboot_thread_fn+0x52c/0xa30 kernel/smpboot.c:164
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
INITIAL USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
_raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:326
f_modown+0x38/0x340 fs/fcntl.c:91
generic_add_lease fs/locks.c:1806 [inline]
generic_setlease+0xf3f/0x1440 fs/locks.c:1886
vfs_setlease fs/locks.c:1976 [inline]
do_fcntl_add_lease fs/locks.c:1997 [inline]
fcntl_setlease+0x341/0x3f0 fs/locks.c:2019
do_fcntl+0x10a/0x1510 fs/fcntl.c:401
__do_sys_fcntl fs/fcntl.c:452 [inline]
__se_sys_fcntl+0xd5/0x1b0 fs/fcntl.c:437
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
INITIAL READ USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
send_sigurg+0x25/0x3b0 fs/fcntl.c:815
sk_send_sigurg+0x6a/0xb0 net/core/sock.c:3362
tcp_check_urg+0x202/0x740 net/ipv4/tcp_input.c:5637
tcp_urg+0x154/0x440 net/ipv4/tcp_input.c:5678
tcp_rcv_established+0xe58/0x1f00 net/ipv4/tcp_input.c:6025
tcp_v6_do_rcv+0x53c/0x1270 net/ipv6/tcp_ipv6.c:1489
sk_backlog_rcv include/net/sock.h:1117 [inline]
__release_sock+0x198/0x4b0 net/core/sock.c:2935
release_sock+0x5d/0x1c0 net/core/sock.c:3499
sk_stream_wait_memory+0x725/0xef0 net/core/stream.c:145
tcp_sendmsg_locked+0x17f5/0x4100 net/ipv4/tcp.c:1451
tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1489
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
__sys_sendto+0x480/0x600 net/socket.c:2148
__do_sys_sendto net/socket.c:2160 [inline]
__se_sys_sendto net/socket.c:2156 [inline]
__x64_sys_sendto+0xda/0xf0 net/socket.c:2156
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
}
... key at: [<ffffffff91d58c60>] __alloc_file.__key+0x0/0x10
... acquired at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
send_sigio+0x2f/0x360 fs/fcntl.c:776
kill_fasync_rcu fs/fcntl.c:1001 [inline]
kill_fasync+0x232/0x4d0 fs/fcntl.c:1015
lease_break_callback+0x22/0x30 fs/locks.c:521
__break_lease+0x4d1/0x1550 fs/locks.c:1521
vfs_truncate+0x267/0x3a0 fs/open.c:105
do_sys_truncate+0xda/0x190 fs/open.c:134
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> (&new->fa_lock){...-}-{2:2} {
IN-SOFTIRQ-R at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
kill_fasync_rcu fs/fcntl.c:994 [inline]
kill_fasync+0x196/0x4d0 fs/fcntl.c:1015
sock_wake_async+0x145/0x170
sk_wake_async+0x186/0x280 include/net/sock.h:2581
sock_def_readable+0x1a7/0x280 net/core/sock.c:3306
tcp_data_queue+0x21c5/0x6fd0 net/ipv4/tcp_input.c:5102
tcp_rcv_state_process+0x2682/0x4510 net/ipv4/tcp_input.c:6704
tcp_v6_do_rcv+0x91c/0x1270 net/ipv6/tcp_ipv6.c:1514
tcp_v6_rcv+0x234e/0x2b60 net/ipv6/tcp_ipv6.c:1753
ip6_protocol_deliver_rcu+0xaf7/0x1300 net/ipv6/ip6_input.c:438
ip6_input_finish+0x183/0x2c0 net/ipv6/ip6_input.c:483
NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302
NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302
__netif_receive_skb_one_core net/core/dev.c:5528 [inline]
__netif_receive_skb+0x1c6/0x530 net/core/dev.c:5642
process_backlog+0x381/0x760 net/core/dev.c:5970
__napi_poll+0xc7/0x470 net/core/dev.c:6537
napi_poll net/core/dev.c:6604 [inline]
net_rx_action+0x70f/0xeb0 net/core/dev.c:6718
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
run_ksoftirqd+0xc1/0x120 kernel/softirq.c:934
smpboot_thread_fn+0x52c/0xa30 kernel/smpboot.c:164
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
INITIAL USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
_raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:326
fasync_remove_entry+0xfb/0x1d0 fs/fcntl.c:871
lease_modify+0x19c/0x380 fs/locks.c:1386
locks_remove_lease fs/locks.c:2624 [inline]
locks_remove_file+0x5d3/0x1040 fs/locks.c:2649
__fput+0x326/0x890 fs/file_table.c:312
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x63/0xcd
INITIAL READ USE at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
kill_fasync_rcu fs/fcntl.c:994 [inline]
kill_fasync+0x196/0x4d0 fs/fcntl.c:1015
lease_break_callback+0x22/0x30 fs/locks.c:521
__break_lease+0x4d1/0x1550 fs/locks.c:1521
vfs_truncate+0x267/0x3a0 fs/open.c:105
do_sys_truncate+0xda/0x190 fs/open.c:134
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
}
... key at: [<ffffffff91d598e0>] fasync_insert_entry.__key+0x0/0x20
... acquired at:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
kill_fasync_rcu fs/fcntl.c:994 [inline]
kill_fasync+0x196/0x4d0 fs/fcntl.c:1015
__pass_event drivers/input/evdev.c:240 [inline]
evdev_pass_values+0x586/0xad0 drivers/input/evdev.c:278
evdev_events+0x1be/0x2f0 drivers/input/evdev.c:306
input_to_handler drivers/input/input.c:127 [inline]
input_pass_values+0x8e0/0x12a0 drivers/input/input.c:159
input_event_dispose+0x366/0x650 drivers/input/input.c:374
input_handle_event+0x97d/0xb00 drivers/input/input.c:402
input_inject_event+0x224/0x330 drivers/input/input.c:461
evdev_write+0x668/0x7c0 drivers/input/evdev.c:530
vfs_write+0x2d9/0xba0 fs/read_write.c:582
ksys_write+0x19c/0x2c0 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd


stack backtrace:
CPU: 0 PID: 24310 Comm: syz-executor.1 Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_bad_irq_dependency kernel/locking/lockdep.c:2604 [inline]
check_irq_usage kernel/locking/lockdep.c:2843 [inline]
check_prev_add kernel/locking/lockdep.c:3094 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x4d16/0x5950 kernel/locking/lockdep.c:3825
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236
kill_fasync_rcu fs/fcntl.c:994 [inline]
kill_fasync+0x196/0x4d0 fs/fcntl.c:1015
__pass_event drivers/input/evdev.c:240 [inline]
evdev_pass_values+0x586/0xad0 drivers/input/evdev.c:278
evdev_events+0x1be/0x2f0 drivers/input/evdev.c:306
input_to_handler drivers/input/input.c:127 [inline]
input_pass_values+0x8e0/0x12a0 drivers/input/input.c:159
input_event_dispose+0x366/0x650 drivers/input/input.c:374
input_handle_event+0x97d/0xb00 drivers/input/input.c:402
input_inject_event+0x224/0x330 drivers/input/input.c:461
evdev_write+0x668/0x7c0 drivers/input/evdev.c:530
vfs_write+0x2d9/0xba0 fs/read_write.c:582
ksys_write+0x19c/0x2c0 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0b2be7dda9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0b2cb9b0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f0b2bfabf80 RCX: 00007f0b2be7dda9
RDX: 0000000000002778 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 00007f0b2beca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f0b2bfabf80 R15: 00007fff1cfd9518
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages