syzbot


INFO: rcu detected stall in kernfs_fop_read_iter (4)

Status: upstream: reported syz repro on 2024/09/28 23:40
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+c403e932e9c6662dd4f2@syzkaller.appspotmail.com
First crash: 147d, last: 30d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly kernfs report (Oct 2024) 0 (1) 2024/10/15 10:07
[syzbot] [kernfs?] [input?] [usb?] INFO: rcu detected stall in kernfs_fop_read_iter (4) 0 (1) 2024/09/28 23:40
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in kernfs_fop_read_iter kernel 1 928d 928d 0/28 auto-obsoleted due to no activity on 2022/11/04 01:43
upstream INFO: rcu detected stall in kernfs_fop_read_iter (3) kernfs 6 243d 422d 0/28 auto-obsoleted due to no activity on 2024/09/18 21:50
upstream INFO: rcu detected stall in kernfs_fop_read_iter (2) kernel 1 636d 636d 0/28 auto-obsoleted due to no activity on 2023/08/22 18:06
android-5-15 BUG: soft lockup in kernfs_fop_read_iter 1 288d 288d 0/2 auto-obsoleted due to no activity on 2024/08/04 18:27
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/02/03 00:45 15m retest repro https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing OK log
2024/11/15 04:48 21m retest repro https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing OK log
2024/11/15 04:48 1h09m retest repro https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing report log

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...0: (1 ticks this GP) idle=c904/1/0x4000000000000000 softirq=97039/97042 fqs=2096
rcu: 	         hardirqs   softirqs   csw/system
rcu: 	 number:        0          0            0
rcu: 	cputime:        0          0            0   ==> 52500(ms)
rcu: 	(detected by 1, t=10505 jiffies, g=101073, q=383027 ncpus=2)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 2846 Comm: udevd Not tainted 6.13.0-rc7-syzkaller-g70cd0576aa39 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:io_serial_out+0x8f/0xb0 drivers/tty/serial/8250/8250_port.c:416
Code: 48 8d 7d 40 44 89 e1 48 b8 00 00 00 00 00 fc ff df 48 89 fa d3 e3 48 c1 ea 03 80 3c 02 00 75 1c 66 03 5d 40 44 89 e8 89 da ee <5b> 5d 41 5c 41 5d c3 cc cc cc cc e8 e1 0e 0c ff eb a0 e8 6a 0f 0c
RSP: 0018:ffffc90000007040 EFLAGS: 00000002
RAX: 000000000000005b RBX: 00000000000003f8 RCX: 0000000000000000
RDX: 00000000000003f8 RSI: ffffffff82a91545 RDI: ffffffff93644920
RBP: ffffffff936448e0 R08: 0000000000000001 R09: 000000000000001f
R10: 0000000000000000 R11: 000000000000000a R12: 0000000000000000
R13: 000000000000005b R14: ffffffff82a914e0 R15: 0000000000000000
FS:  00007fdff9bcdc80(0000) GS:ffff8881f5800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200012b8 CR3: 0000000116998000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 serial_out drivers/tty/serial/8250/8250.h:142 [inline]
 serial8250_console_fifo_write drivers/tty/serial/8250/8250_port.c:3342 [inline]
 serial8250_console_write+0xf9e/0x17c0 drivers/tty/serial/8250/8250_port.c:3413
 console_emit_next_record kernel/printk/printk.c:3122 [inline]
 console_flush_all+0x800/0xc60 kernel/printk/printk.c:3210
 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline]
 console_unlock+0xd9/0x210 kernel/printk/printk.c:3309
 vprintk_emit+0x424/0x6f0 kernel/printk/printk.c:2432
 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:86
 _printk+0xc8/0x100 kernel/printk/printk.c:2457
 sched_show_task kernel/sched/core.c:7704 [inline]
 sched_show_task+0x3c1/0x5f0 kernel/sched/core.c:7686
 show_state_filter+0xee/0x320 kernel/sched/core.c:7756
 k_spec drivers/tty/vt/keyboard.c:667 [inline]
 k_spec+0xed/0x150 drivers/tty/vt/keyboard.c:656
 kbd_keycode drivers/tty/vt/keyboard.c:1522 [inline]
 kbd_event+0xcbd/0x17a0 drivers/tty/vt/keyboard.c:1541
 input_handle_events_default+0x116/0x1b0 drivers/input/input.c:2646
 input_pass_values+0x738/0x880 drivers/input/input.c:126
 input_event_dispose drivers/input/input.c:352 [inline]
 input_handle_event+0xb30/0x14d0 drivers/input/input.c:369
 input_event drivers/input/input.c:398 [inline]
 input_event+0x83/0xa0 drivers/input/input.c:390
 hidinput_hid_event+0xa12/0x2410 drivers/hid/hid-input.c:1719
 hid_process_event+0x4b7/0x5e0 drivers/hid/hid-core.c:1546
 hid_input_array_field+0x535/0x710 drivers/hid/hid-core.c:1658
 hid_process_report drivers/hid/hid-core.c:1700 [inline]
 hid_report_raw_event+0xabc/0x1280 drivers/hid/hid-core.c:2046
 __hid_input_report.constprop.0+0x341/0x440 drivers/hid/hid-core.c:2116
 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:285
 __usb_hcd_giveback_urb+0x389/0x6e0 drivers/usb/core/hcd.c:1650
 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734
 dummy_timer+0x17f7/0x3960 drivers/usb/gadget/udc/dummy_hcd.c:1994
 __run_hrtimer kernel/time/hrtimer.c:1739 [inline]
 __hrtimer_run_queues+0x20a/0xae0 kernel/time/hrtimer.c:1803
 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1820
 handle_softirqs+0x206/0x8d0 kernel/softirq.c:561
 __do_softirq kernel/softirq.c:595 [inline]
 invoke_softirq kernel/softirq.c:435 [inline]
 __irq_exit_rcu+0xfa/0x160 kernel/softirq.c:662
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
 sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1049
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_acquire.part.0+0x155/0x380 kernel/locking/lockdep.c:5814
Code: b8 ff ff ff ff 65 0f c1 05 d0 38 ca 7e 83 f8 01 0f 85 d0 01 00 00 9c 58 f6 c4 02 0f 85 e5 01 00 00 48 85 ed 0f 85 b6 01 00 00 <48> b8 00 00 00 00 00 fc ff df 48 01 c3 48 c7 03 00 00 00 00 48 c7
RSP: 0018:ffffc9000181f9b8 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 1ffff92000303f38 RCX: ffffffff8137589e
RDX: 0000000000000001 RSI: ffffffff872801e0 RDI: ffffffff87473460
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff1f57bd4
R10: ffffffff8fabdea7 R11: 0000000000000001 R12: 0000000000000000
R13: ffff888119d07888 R14: 0000000000000000 R15: 0000000000000000
 __mutex_lock_common kernel/locking/mutex.c:585 [inline]
 __mutex_lock+0x19b/0xa60 kernel/locking/mutex.c:735
 kernfs_seq_start+0x4d/0x240 fs/kernfs/file.c:154
 seq_read_iter+0x2ab/0x12b0 fs/seq_file.c:225
 kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
 new_sync_read fs/read_write.c:484 [inline]
 vfs_read+0x87f/0xbe0 fs/read_write.c:565
 ksys_read+0x12b/0x250 fs/read_write.c:708
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fdff9cf8b6a
Code: 00 3d 00 00 41 00 75 0d 50 48 8d 3d 2d 08 0a 00 e8 ea 7d 01 00 31 c0 e9 07 ff ff ff 64 8b 04 25 18 00 00 00 85 c0 75 1b 0f 05 <48> 3d 00 f0 ff ff 76 6c 48 8b 15 8f a2 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffd91557288 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 000055bea6a182c0 RCX: 00007fdff9cf8b6a
RDX: 0000000000001000 RSI: 000055bea6a25890 RDI: 000000000000000c
RBP: 000055bea6a182c0 R08: 000000000000000c R09: 0000000000000000
R10: 000000000000010f R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000003fff R14: 00007ffd91557768 R15: 000000000000000a
 </TASK>
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x102c/0x34b0 kernel/sched/core.c:6756
 do_task_dead+0xd6/0x110 kernel/sched/core.c:6772
 do_exit+0x1de2/0x2ce0 kernel/exit.c:989
 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087
 __do_sys_exit_group kernel/exit.c:1098 [inline]
 __se_sys_exit_group kernel/exit.c:1096 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096
 x64_sys_call+0x151f/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7f71a11a90
RSP: 002b:00007ffd71f114c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f7f71b02860 RCX: 00007f7f71a11a90
RDX: 00000000000000e7 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00007f7f71b02860 R08: 0000000000000001 R09: 45cb3fb7e19667af
R10: 00007ffd71f11380 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f7f71b06658 R15: 0000000000000001
 </TASK>
task:kworker/u8:4    state:I stack:30928 pid:15784 tgid:15784 ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x102c/0x34b0 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0xe7/0x350 kernel/sched/core.c:6848
 worker_thread+0x2de/0xf00 kernel/workqueue.c:3413
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Showing all locks held in the system:
6 locks held by udevd/2846:
 #0: ffff88810d3d2b08 (&p->lock){+.+.}-{4:4}, at: seq_read_iter+0xd8/0x12b0 fs/seq_file.c:182
 #1: ffff888119d07888 (&of->mutex){+.+.}-{4:4}, at: kernfs_seq_start+0x4d/0x240 fs/kernfs/file.c:154
 #2: ffff88811689b230 (&dev->event_lock){..-.}-{3:3}, at: input_event drivers/input/input.c:397 [inline]
 #2: ffff88811689b230 (&dev->event_lock){..-.}-{3:3}, at: input_event+0x70/0xa0 drivers/input/input.c:390
 #3: ffffffff88ebc880 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #3: ffffffff88ebc880 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #3: ffffffff88ebc880 (rcu_read_lock){....}-{1:3}, at: input_pass_values+0x8b/0x880 drivers/input/input.c:118
 #4: ffffffff89393a38 (kbd_event_lock){..-.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #4: ffffffff89393a38 (kbd_event_lock){..-.}-{3:3}, at: kbd_event+0x8a/0x17a0 drivers/tty/vt/keyboard.c:1535
 #5: ffffffff88ebc880 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #5: ffffffff88ebc880 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #5: ffffffff88ebc880 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x7f/0x390 kernel/locking/lockdep.c:6744
2 locks held by getty/2904:
 #0: ffff88811214c0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffffc900000432f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0xfba/0x1480 drivers/tty/n_tty.c:2211
3 locks held by kworker/1:3/5237:
 #0: ffff888100080948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1293/0x1ba0 kernel/workqueue.c:3211
 #1: ffffc900021bfd80 ((work_completion)(&fw_work->work)){+.+.}-{0:0}, at: process_one_work+0x921/0x1ba0 kernel/workqueue.c:3212
 #2: ffff88810bf90190 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
 #2: ffff88810bf90190 (&dev->mutex){....}-{4:4}, at: ath9k_hif_usb_firmware_fail drivers/net/wireless/ath/ath9k/hif_usb.c:1161 [inline]
 #2: ffff88810bf90190 (&dev->mutex){....}-{4:4}, at: ath9k_hif_usb_firmware_cb+0x3b1/0x620 drivers/net/wireless/ath/ath9k/hif_usb.c:1294
5 locks held by kworker/0:1/8321:
8 locks held by kworker/1:0/10172:
 #0: ffff8881066aed48 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x1293/0x1ba0 kernel/workqueue.c:3211
 #1: ffffc90014027d80 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x921/0x1ba0 kernel/workqueue.c:3212
 #2: ffff88810b72e190 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
 #2: ffff88810b72e190 (&dev->mutex){....}-{4:4}, at: hub_event+0x1be/0x4f40 drivers/usb/core/hub.c:5851
 #3: ffff888107aed190 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
 #3: ffff888107aed190 (&dev->mutex){....}-{4:4}, at: usb_disconnect+0x10a/0x920 drivers/usb/core/hub.c:2296
 #4: ffff88811f3e0160 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
 #4: ffff88811f3e0160 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1095 [inline]
 #4: ffff88811f3e0160 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xa4/0x610 drivers/base/dd.c:1293
 #5: ffff888140a71a20 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
 #5: ffff888140a71a20 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1095 [inline]
 #5: ffff888140a71a20 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xa4/0x610 drivers/base/dd.c:1293
 #6: ffffffff89be1de8 (input_mutex){+.+.}-{4:4}, at: __input_unregister_device+0x136/0x450 drivers/input/input.c:2277
 #7: ffffffff88ec81b8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock+0x1a4/0x3b0 kernel/rcu/tree_exp.h:329
1 lock held by syz.9.1426/12940:
 #0: ffffffff88ec81b8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock+0x282/0x3b0 kernel/rcu/tree_exp.h:297

=============================================


Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/19 21:49 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 70cd0576aa39 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/31 14:40 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing c67e9601e29a 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/28 04:32 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing c6d9e43954bf 65e8686b .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/19 13:47 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 07b887f8236e cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/19 00:47 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 07b887f8236e cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/15 22:18 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 64f3b5a6bc49 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/12 19:51 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/09 13:03 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 56fb2cb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/05 04:57 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4a9fe2a8ac53 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/10/02 16:16 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 9852d85ec9d4 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/09/27 13:24 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 075dbe9f6e3c 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/09/26 17:32 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 68d4209158f4 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
2024/09/24 23:31 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 68d4209158f4 5643e0e9 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: rcu detected stall in kernfs_fop_read_iter
* Struck through repros no longer work on HEAD.