syzbot


INFO: task hung in usbdev_ioctl

Status: closed as invalid on 2022/02/08 09:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 373d, last: 367d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in usbdev_ioctl (2) 1 281d 281d 0/24 auto-closed as invalid on 2022/05/21 06:20

Sample crash report:
INFO: task syz-executor.5:27857 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:26960 pid:27857 ppid: 24037 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 device_lock include/linux/device.h:760 [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:0x7f19dc339ae9
RSP: 002b:00007f19d98af188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f19dc44cf60 RCX: 00007f19dc339ae9
RDX: 0000000020000040 RSI: 00000000c0105512 RDI: 0000000000000005
RBP: 00007f19dc393f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe83b7cebf R14: 00007f19d98af300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.5:27863 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:27632 pid:27863 ppid: 24037 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 device_lock include/linux/device.h:760 [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:0x7f19dc339ae9
RSP: 002b:00007f19d988e188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f19dc44d020 RCX: 00007f19dc339ae9
RDX: 0000000020000380 RSI: 000000008108551b RDI: 0000000000000005
RBP: 00007f19dc393f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe83b7cebf R14: 00007f19d988e300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.5:27866 blocked for more than 144 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:27632 pid:27866 ppid: 24037 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 device_lock include/linux/device.h:760 [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:0x7f19dc339ae9
RSP: 002b:00007f19d986d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f19dc44d0e0 RCX: 00007f19dc339ae9
RDX: 000000002005a700 RSI: 0000000081f8943c RDI: 0000000000000005
RBP: 00007f19dc393f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe83b7cebf R14: 00007f19d986d300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.3:27854 blocked for more than 144 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:23704 pid:27854 ppid: 10398 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 device_lock include/linux/device.h:760 [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:0x7f4dea070ae9
RSP: 002b:00007f4de75e6188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f4dea183f60 RCX: 00007f4dea070ae9
RDX: 0000000020000380 RSI: 000000008108551b RDI: 0000000000000005
RBP: 00007f4dea0caf6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc40e1da0f R14: 00007f4de75e6300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.3:27865 blocked for more than 144 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:27632 pid:27865 ppid: 10398 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 device_lock include/linux/device.h:760 [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:0x7f4dea070ae9
RSP: 002b:00007f4de75c5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f4dea184020 RCX: 00007f4dea070ae9
RDX: 000000002005a700 RSI: 0000000081f8943c RDI: 0000000000000005
RBP: 00007f4dea0caf6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc40e1da0f R14: 00007f4de75c5300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.2:27874 blocked for more than 145 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:26608 pid:27874 ppid:  6527 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 device_lock include/linux/device.h:760 [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:822
 do_open fs/namei.c:3426 [inline]
 path_openat+0x2896/0x3660 fs/namei.c:3559
 do_filp_open+0x277/0x4f0 fs/namei.c:3586
 do_sys_openat2+0x13b/0x500 fs/open.c:1212
 do_sys_open fs/open.c:1228 [inline]
 __do_sys_openat fs/open.c:1244 [inline]
 __se_sys_openat fs/open.c:1239 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1239
 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:0x7fb746850a04
RSP: 002b:00007fb743e12cc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 6666666666666667 RCX: 00007fb746850a04
RDX: 0000000000000001 RSI: 00007fb743e12d60 RDI: 00000000ffffff9c
RBP: 00007fb743e12d60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001
R13: 00007ffceb48e17f R14: 00007fb743e13300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8cb1dd40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by systemd-journal/2963:
 #0: ffff8880b9b395d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x25/0x110 kernel/sched/core.c:478
1 lock held by in:imklog/6207:
 #0: ffff888021fb4ff0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x24e/0x2f0 fs/file.c:990
5 locks held by kworker/0:17/25592:
 #0: ffff888141daf538 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7ca/0x1140
 #1: ffffc9001203fd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x808/0x1140 kernel/workqueue.c:2273
 #2: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #2: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1b2/0xe40 drivers/usb/core/hub.c:5662
 #3: ffff8880425c25c0 (&port_dev->status_lock){+.+.}-{3:3}, at: usb_lock_port drivers/usb/core/hub.c:3086 [inline]
 #3: ffff8880425c25c0 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect+0xce1/0x27d0 drivers/usb/core/hub.c:5279
 #4: ffff88801d97df68 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_init+0x1ef/0x2df0 drivers/usb/core/hub.c:4703
1 lock held by syz-executor.5/27857:
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.5/27863:
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.5/27866:
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.3/27854:
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.3/27865:
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_do_ioctl drivers/usb/core/devio.c:2583 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_ioctl+0x268/0x6d00 drivers/usb/core/devio.c:2791
1 lock held by syz-executor.2/27874:
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888147f71220 (&dev->mutex){....}-{3:3}, at: usbdev_open+0x153/0x780 drivers/usb/core/devio.c:1030

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc2-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+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:210 [inline]
 watchdog+0xc82/0xcd0 kernel/hung_task.c:295
 kthread+0x468/0x490 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 10 Comm: kworker/u4:1 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: bat_events batadv_nc_worker
RIP: 0010:__lock_acquire+0x3a1/0x2b00
Code: d8 48 c1 e8 03 48 89 84 24 98 00 00 00 80 3c 30 00 74 17 48 89 df e8 4e 6b 6a 00 48 8b 7c 24 18 48 be 00 00 00 00 00 fc ff df <48> 89 9c 24 a0 00 00 00 4c 89 3b 4a 8d 9c e7 70 0a 00 00 48 89 d8
RSP: 0018:ffffc90000cf7900 EFLAGS: 00000046
RAX: 1ffff110023fc4f7 RBX: ffff888011fe27b8 RCX: 0000000000000000
RDX: 0000000000000028 RSI: dffffc0000000000 RDI: ffff888011fe1d00
RBP: ffffc90000cf7a50 R08: 0000000000000000 R09: 0000000000000000
R10: fffffbfff1bfd166 R11: 0000000000000000 R12: 000000000000000a
R13: 0000000000000002 R14: 0000000000000028 R15: ffffffff89f00ed5
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8ac84f2000 CR3: 000000006f4b0000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x19f/0x4d0 kernel/locking/lockdep.c:5637
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:268
 rcu_read_lock include/linux/rcupdate.h:688 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline]
 batadv_nc_worker+0xc8/0x5b0 net/batman-adv/network-coding.c:723
 process_one_work+0x853/0x1140 kernel/workqueue.c:2298
 worker_thread+0xac1/0x1320 kernel/workqueue.c:2445
 kthread+0x468/0x490 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30
 </TASK>
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	48 c1 e8 03          	shr    $0x3,%rax
   4:	48 89 84 24 98 00 00 	mov    %rax,0x98(%rsp)
   b:	00
   c:	80 3c 30 00          	cmpb   $0x0,(%rax,%rsi,1)
  10:	74 17                	je     0x29
  12:	48 89 df             	mov    %rbx,%rdi
  15:	e8 4e 6b 6a 00       	callq  0x6a6b68
  1a:	48 8b 7c 24 18       	mov    0x18(%rsp),%rdi
  1f:	48 be 00 00 00 00 00 	movabs $0xdffffc0000000000,%rsi
  26:	fc ff df
* 29:	48 89 9c 24 a0 00 00 	mov    %rbx,0xa0(%rsp) <-- trapping instruction
  30:	00
  31:	4c 89 3b             	mov    %r15,(%rbx)
  34:	4a 8d 9c e7 70 0a 00 	lea    0xa70(%rdi,%r12,8),%rbx
  3b:	00
  3c:	48 89 d8             	mov    %rbx,%rax

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2021/11/25 18:37 upstream 5f53fa508db0 63eeac02 .config log report info INFO: task hung in usbdev_ioctl
ci-upstream-kasan-gce-selinux-root 2021/11/25 15:57 upstream 5f53fa508db0 545ab074 .config log report info INFO: task hung in usbdev_ioctl
ci-upstream-kasan-gce-386 2021/11/20 01:10 upstream 4c388a8e740d 3a9d0024 .config log report info INFO: task hung in usbdev_ioctl
* Struck through repros no longer work on HEAD.