syzbot


INFO: task hung in usb_deregister_dev

Status: auto-obsoleted due to no activity on 2023/09/05 16:52
Reported-by: syzbot+7bd564de5924d5815609@syzkaller.appspotmail.com
First crash: 577d, last: 577d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in usb_deregister_dev usb 258 614d 1633d 0/28 auto-obsoleted due to no activity on 2023/08/20 12:33
upstream INFO: task hung in usb_deregister_dev (2) usb C 36 46d 107d 0/28 upstream: reported C repro on 2024/09/09 21:32
linux-5.15 INFO: task hung in usb_deregister_dev 1 635d 635d 0/3 auto-obsoleted due to no activity on 2023/07/30 01:49

Sample crash report:
INFO: task kworker/1:5:4332 blocked for more than 143 seconds.
      Not tainted 6.1.30-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:5     state:D stack:0     pid:4332  ppid:2      flags:0x00000008
Workqueue: usb_hub_wq hub_event
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0xee4/0x1c98 kernel/sched/core.c:6554
 schedule+0xc4/0x170 kernel/sched/core.c:6630
 rwsem_down_write_slowpath+0xc80/0x156c kernel/locking/rwsem.c:1189
 __down_write_common kernel/locking/rwsem.c:1314 [inline]
 __down_write kernel/locking/rwsem.c:1323 [inline]
 down_write+0x84/0x88 kernel/locking/rwsem.c:1574
 usb_deregister_dev+0xb8/0x304 drivers/usb/core/file.c:239
 sisusb_disconnect+0x58/0x20c drivers/usb/misc/sisusbvga/sisusb.c:3166
 usb_unbind_interface+0x1a4/0x758 drivers/usb/core/driver.c:458
 device_remove drivers/base/dd.c:550 [inline]
 __device_release_driver drivers/base/dd.c:1258 [inline]
 device_release_driver_internal+0x474/0x724 drivers/base/dd.c:1284
 device_release_driver+0x28/0x38 drivers/base/dd.c:1307
 bus_remove_device+0x298/0x38c drivers/base/bus.c:529
 device_del+0x57c/0x9b4 drivers/base/core.c:3852
 usb_disable_device+0x354/0x760 drivers/usb/core/message.c:1419
 usb_disconnect+0x290/0x7b0 drivers/usb/core/hub.c:2238
 hub_port_connect drivers/usb/core/hub.c:5199 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5499 [inline]
 port_event drivers/usb/core/hub.c:5655 [inline]
 hub_event+0x17a0/0x44a0 drivers/usb/core/hub.c:5737
 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2289
 process_scheduled_works kernel/workqueue.c:2352 [inline]
 worker_thread+0xb6c/0xfec kernel/workqueue.c:2438
 kthread+0x250/0x2d8 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffff800015784e70 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffff800015785670 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
 #0: ffff800015784ca0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:305
2 locks held by getty/3979:
 #0: ffff0000d8090098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff80001ba302f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1210 drivers/tty/n_tty.c:2177
2 locks held by kworker/u4:1/4290:
6 locks held by kworker/1:5/4332:
 #0: ffff0000c46a1138 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2262
 #1: ffff80001f097c20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2264
 #2: ffff0000d150f190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
 #2: ffff0000d150f190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1c0/0x44a0 drivers/usb/core/hub.c:5683
 #3: ffff0000c426e190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
 #3: ffff0000c426e190 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0xec/0x7b0 drivers/usb/core/hub.c:2229
 #4: ffff0000c426a118 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
 #4: ffff0000c426a118 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1078 [inline]
 #4: ffff0000c426a118 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xbc/0x724 drivers/base/dd.c:1281
 #5: ffff800016fa4b50 (minor_rwsem#2){++++}-{3:3}, at: usb_deregister_dev+0xb8/0x304 drivers/usb/core/file.c:239
2 locks held by kworker/u4:8/9466:
2 locks held by syz-executor.5/14983:
 #0: ffff800016fa4b50 (minor_rwsem#2){++++}-{3:3}, at: usb_open+0x3c/0x2c4 drivers/usb/core/file.c:39
 #1: ffff0000c97860d0 (&(sisusb->lock)){+.+.}-{3:3}, at: sisusb_open+0x98/0x3e0 drivers/usb/misc/sisusbvga/sisusb.c:2396
4 locks held by udevd/15013:
 #0: ffff0000c62c58b8 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xac/0xc44 fs/seq_file.c:182
 #1: ffff00012c1dc088 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x58/0x384 fs/kernfs/file.c:150
 #2: ffff0000c33f4830 (kn->active#9){.+.+}-{0:0}, at: kernfs_seq_start+0x74/0x384 fs/kernfs/file.c:151
 #3: ffff0000c426e190 (&dev->mutex){....}-{3:3}, at: device_lock_interruptible include/linux/device.h:841 [inline]
 #3: ffff0000c426e190 (&dev->mutex){....}-{3:3}, at: manufacturer_show+0x30/0xac drivers/usb/core/sysfs.c:141

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


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/28 16:51 linux-6.1.y a343b0dd87b4 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in usb_deregister_dev
* Struck through repros no longer work on HEAD.