syzbot


INFO: task hung in usbdev_ioctl (2)

Status: auto-closed as invalid on 2022/05/21 06:20
Subsystems: usb
[Documentation on labels]
First crash: 789d, last: 789d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in usbdev_ioctl 1 18d 18d 0/3 upstream: reported on 2024/04/01 11:29
upstream INFO: task hung in usbdev_ioctl (4) usb 1 299d 299d 0/26 auto-obsoleted due to no activity on 2023/09/22 21:55
upstream INFO: task hung in usbdev_ioctl (3) usb 4 419d 578d 0/26 auto-obsoleted due to no activity on 2023/05/26 15:30
upstream INFO: task hung in usbdev_ioctl usb 3 875d 881d 0/26 closed as invalid on 2022/02/08 09:40

Sample crash report:
INFO: task syz-executor.0:17246 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:24912 pid:17246 ppid:  3626 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4987 [inline]
 __schedule+0x926/0x1080 kernel/sched/core.c:6296
 schedule+0x12b/0x1f0 kernel/sched/core.c:6369
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6428
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:673
 __mutex_lock kernel/locking/mutex.c:733 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:785
 device_lock include/linux/device.h:767 [inline]
 usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f98ba719059
RSP: 002b:00007f98b908e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f98ba82bf60 RCX: 00007f98ba719059
RDX: 00000000200000c0 RSI: 00000000c0185500 RDI: 0000000000000003
RBP: 00007f98ba77308d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc2d98e7ff R14: 00007f98b908e300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.0:17253 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:27664 pid:17253 ppid:  3626 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4987 [inline]
 __schedule+0x926/0x1080 kernel/sched/core.c:6296
 schedule+0x12b/0x1f0 kernel/sched/core.c:6369
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6428
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:673
 __mutex_lock kernel/locking/mutex.c:733 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:785
 device_lock include/linux/device.h:767 [inline]
 usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f98ba719059
RSP: 002b:00007f98b906d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f98ba82c030 RCX: 00007f98ba719059
RDX: 0000000020000880 RSI: 0000000050009401 RDI: 0000000000000003
RBP: 00007f98ba77308d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc2d98e7ff R14: 00007f98b906d300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.0:17264 blocked for more than 144 seconds.
      Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:27088 pid:17264 ppid:  3626 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4987 [inline]
 __schedule+0x926/0x1080 kernel/sched/core.c:6296
 schedule+0x12b/0x1f0 kernel/sched/core.c:6369
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6428
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:673
 __mutex_lock kernel/locking/mutex.c:733 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:785
 device_lock include/linux/device.h:767 [inline]
 usbdev_open+0x153/0x780 drivers/usb/core/devio.c:1030
 chrdev_open+0x5fb/0x680 fs/char_dev.c:414
 do_dentry_open+0x78b/0x1020 fs/open.c:824
 do_open fs/namei.c:3476 [inline]
 path_openat+0x273b/0x36a0 fs/namei.c:3609
 do_filp_open+0x277/0x4f0 fs/namei.c:3636
 do_sys_openat2+0x13b/0x500 fs/open.c:1214
 do_sys_open fs/open.c:1230 [inline]
 __do_sys_openat fs/open.c:1246 [inline]
 __se_sys_openat fs/open.c:1241 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1241
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f98ba6cbf74
RSP: 002b:00007f98b902aca0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 6666666666666667 RCX: 00007f98ba6cbf74
RDX: 0000000000068501 RSI: 00007f98b902ad40 RDI: 00000000ffffff9c
RBP: 00007f98b902ad40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000068501
R13: 00007ffc2d98e7ff R14: 00007f98b902b300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8cb1d460 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
5 locks held by kworker/1:3/2980:
 #0: ffff888141996138 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7db/0x1190 kernel/workqueue.c:2280
 #1: ffffc90001b3fd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x81b/0x1190 kernel/workqueue.c:2282
 #2: ffff888148125220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:767 [inline]
 #2: ffff888148125220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1b2/0xe40 drivers/usb/core/hub.c:5688
 #3: ffff888148159580 (&port_dev->status_lock){+.+.}-{3:3}, at: usb_lock_port drivers/usb/core/hub.c:3091 [inline]
 #3: ffff888148159580 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect+0x4f4/0x2910 drivers/usb/core/hub.c:5254
 #4: ffff888147fad068 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect+0x51d/0x2910 drivers/usb/core/hub.c:5255
2 locks held by getty/3278:
 #0: ffff8880240e5098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002b662e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6c5/0x1c60 drivers/tty/n_tty.c:2075
4 locks held by kworker/u4:3/16083:
 #0: ffff8880b9a39798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x25/0x110 kernel/sched/core.c:489
 #1: ffff8880b9a27848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x4d3/0x790 kernel/sched/psi.c:891
 #2: ffff88807d528d80 (&wdev->mtx){+.+.}-{3:3}, at: sdata_lock net/mac80211/ieee80211_i.h:1033 [inline]
 #2: ffff88807d528d80 (&wdev->mtx){+.+.}-{3:3}, at: ieee80211_ibss_work+0xa0/0x14f0 net/mac80211/ibss.c:1681
 #3: ffffffff8cb1d460 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:267
1 lock held by syz-executor.0/17246:
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:767 [inline]
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.0/17253:
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:767 [inline]
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.0/17264:
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:767 [inline]
 #0: ffff888148125220 (&dev->mutex){....}-{3:3}, at: usbdev_open+0x153/0x780 drivers/usb/core/devio.c:1030

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #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+0x1dc/0x2d8 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x45f/0x490 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x16a/0x280 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xc82/0xcd0 kernel/hung_task.c:369
 kthread+0x2a3/0x2d0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 15748 Comm: kworker/0:0 Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events nsim_dev_trap_report_work
RIP: 0010:separate_irq_context kernel/locking/lockdep.c:4549 [inline]
RIP: 0010:__lock_acquire+0xe5f/0x2b00 kernel/locking/lockdep.c:5011
Code: df 4d 89 7d 00 48 8b 44 24 48 8a 04 38 84 c0 0f 85 8b 13 00 00 48 8b 44 24 28 8b 18 48 85 db 74 57 83 fb 31 0f 83 dd 17 00 00 <48> 8d 04 9b 49 8d 9c c6 58 0a 00 00 48 89 d8 48 c1 e8 03 8a 04 38
RSP: 0018:ffffc900091b76a0 EFLAGS: 00000083
RAX: ffff888079c3e158 RBX: 0000000000000004 RCX: ffffffff8166f3d2
RDX: 0000000000000000 RSI: 0000000000000008 RDI: dffffc0000000000
RBP: ffffc900091b77f0 R08: dffffc0000000000 R09: fffffbfff1ffb7c7
R10: fffffbfff1ffb7c7 R11: 0000000000000000 R12: ffff888079c3e150
R13: ffff888079c3e200 R14: ffff888079c3d700 R15: 5f19b9331a8dae73
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fabfe7966c8 CR3: 000000007f0e6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x19f/0x4d0 kernel/locking/lockdep.c:5639
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
 _crng_backtrack_protect drivers/char/random.c:1024 [inline]
 crng_backtrack_protect+0x263/0x720 drivers/char/random.c:1034
 get_random_bytes+0x14b/0x230 drivers/char/random.c:1475
 eth_random_addr include/linux/etherdevice.h:232 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:752 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:802 [inline]
 nsim_dev_trap_report_work+0x31b/0xaf0 drivers/net/netdevsim/dev.c:843
 process_one_work+0x86c/0x1190 kernel/workqueue.c:2307
 worker_thread+0xab1/0x1300 kernel/workqueue.c:2454
 kthread+0x2a3/0x2d0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30
 </TASK>
----------------
Code disassembly (best guess):
   0:	df 4d 89             	fisttps -0x77(%rbp)
   3:	7d 00                	jge    0x5
   5:	48 8b 44 24 48       	mov    0x48(%rsp),%rax
   a:	8a 04 38             	mov    (%rax,%rdi,1),%al
   d:	84 c0                	test   %al,%al
   f:	0f 85 8b 13 00 00    	jne    0x13a0
  15:	48 8b 44 24 28       	mov    0x28(%rsp),%rax
  1a:	8b 18                	mov    (%rax),%ebx
  1c:	48 85 db             	test   %rbx,%rbx
  1f:	74 57                	je     0x78
  21:	83 fb 31             	cmp    $0x31,%ebx
  24:	0f 83 dd 17 00 00    	jae    0x1807
* 2a:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax <-- trapping instruction
  2e:	49 8d 9c c6 58 0a 00 	lea    0xa58(%r14,%rax,8),%rbx
  35:	00
  36:	48 89 d8             	mov    %rbx,%rax
  39:	48 c1 e8 03          	shr    $0x3,%rax
  3d:	8a 04 38             	mov    (%rax,%rdi,1),%al

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/20 06:14 upstream 4f12b742eb2b 3cd800e4 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in usbdev_ioctl
* Struck through repros no longer work on HEAD.