syzbot


INFO: task hung in usb_deregister_dev

Status: auto-obsoleted due to no activity on 2023/07/30 01:49
Reported-by: syzbot+612de34cb8a9014fb379@syzkaller.appspotmail.com
First crash: 397d, last: 397d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in usb_deregister_dev usb 258 376d 1395d 0/26 auto-obsoleted due to no activity on 2023/08/20 12:33
linux-6.1 INFO: task hung in usb_deregister_dev 1 339d 339d 0/3 auto-obsoleted due to no activity on 2023/09/05 16:52

Sample crash report:
INFO: task kworker/1:20:5701 blocked for more than 143 seconds.
      Not tainted 5.15.105-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:20    state:D stack:22712 pid: 5701 ppid:     2 flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 rwsem_down_write_slowpath+0xebb/0x15c0 kernel/locking/rwsem.c:1157
 __down_write_common kernel/locking/rwsem.c:1284 [inline]
 __down_write kernel/locking/rwsem.c:1293 [inline]
 down_write+0x164/0x170 kernel/locking/rwsem.c:1542
 usb_deregister_dev+0xa3/0x2e0 drivers/usb/core/file.c:239
 sisusb_disconnect+0x56/0x210 drivers/usb/misc/sisusbvga/sisusb.c:3166
 usb_unbind_interface+0x1cd/0x840 drivers/usb/core/driver.c:458
 __device_release_driver drivers/base/dd.c:1224 [inline]
 device_release_driver_internal+0x50e/0x7f0 drivers/base/dd.c:1257
 bus_remove_device+0x2e5/0x400 drivers/base/bus.c:529
 device_del+0x6e2/0xbd0 drivers/base/core.c:3582
 usb_disable_device+0x3b8/0x840 drivers/usb/core/message.c:1419
 usb_disconnect+0x33c/0x8c0 drivers/usb/core/hub.c:2231
 hub_port_connect drivers/usb/core/hub.c:5202 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5502 [inline]
 port_event drivers/usb/core/hub.c:5648 [inline]
 hub_event+0x1e63/0x56d0 drivers/usb/core/hub.c:5730
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2306
 process_scheduled_works kernel/workqueue.c:2369 [inline]
 worker_thread+0xdcf/0x1280 kernel/workqueue.c:2455
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91b920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3273:
 #0: ffff88814aa3a098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002bb32e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1da0 drivers/tty/n_tty.c:2147
1 lock held by syz-executor.1/3635:
 #0: ffff88801b9a8118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x14d/0xa50 block/bdev.c:817
2 locks held by syz-executor.4/3638:
 #0: ffff88801b9cd118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff88801b9b5468 (&lo->lo_mutex){+.+.}-{3:3}, at: __loop_clr_fd+0xa9/0xbe0 drivers/block/loop.c:1348
2 locks held by syz-executor.5/3642:
 #0: ffff8881472d8118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff88801b92d468 (&lo->lo_mutex){+.+.}-{3:3}, at: __loop_clr_fd+0xa9/0xbe0 drivers/block/loop.c:1348
3 locks held by kworker/0:3/3674:
 #0: ffff888011c64d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2279
 #1: ffffc9000302fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2281
 #2: ffffffff8c91fe68 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #2: ffffffff8c91fe68 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:840
2 locks held by kworker/u4:7/3745:
2 locks held by kworker/0:19/5365:
 #0: ffff888011c66538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2279
 #1: ffffc900065e7d20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2281
6 locks held by kworker/1:20/5701:
 #0: ffff888013bdbd38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2279
 #1: ffffc9000f087d20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2281
 #2: ffff88801eea6220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #2: ffff88801eea6220 (&dev->mutex){....}-{3:3}, at: hub_event+0x207/0x56d0 drivers/usb/core/hub.c:5676
 #3: ffff88803f01e220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #3: ffff88803f01e220 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0xfa/0x8c0 drivers/usb/core/hub.c:2222
 #4: ffff88807c59d1a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #4: ffff88807c59d1a8 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1039 [inline]
 #4: ffff88807c59d1a8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xc2/0x7f0 drivers/base/dd.c:1254
 #5: ffffffff8d382450 (minor_rwsem#2){++++}-{3:3}, at: usb_deregister_dev+0xa3/0x2e0 drivers/usb/core/file.c:239
2 locks held by kworker/u4:17/11887:
2 locks held by syz-executor.3/19239:
 #0: ffffffff8d382450 (minor_rwsem#2){++++}-{3:3}, at: usb_open+0x2c/0x2f0 drivers/usb/core/file.c:39
 #1: ffff88807347b8d0 (&(sisusb->lock)){+.+.}-{3:3}, at: sisusb_open+0x91/0x420 drivers/usb/misc/sisusbvga/sisusb.c:2396
4 locks held by kworker/u4:1/20027:
 #0: ffff888011db5138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2279
 #1: ffffc9000313fd20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2281
 #2: ffffffff8d9c7d10 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:558
 #3: ffffffff8c91fd70 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x9c/0x4e0 kernel/rcu/tree.c:3994
1 lock held by syz-executor.3/20417:
 #0: ffff88801eea6220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff88801eea6220 (&dev->mutex){....}-{3:3}, at: usbdev_open+0x152/0x7a0 drivers/usb/core/devio.c:1030
2 locks held by udevd/20617:
 #0: ffff88801b9a8118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff888146cdc468 (&lo->lo_mutex){+.+.}-{3:3}, at: __loop_clr_fd+0xa9/0xbe0 drivers/block/loop.c:1348
4 locks held by syz-executor.2/20682:
 #0: ffff8880b9b39698 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
 #1: ffff8880b9b27848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
 #2: ffff88807d20a658 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xae/0x1300 kernel/sched/core.c:4026
 #3: ffff8880b9b39698 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
2 locks held by syz-executor.2/20683:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.105-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 11887 Comm: kworker/u4:17 Not tainted 5.15.105-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: bat_events batadv_nc_worker
RIP: 0010:__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
RIP: 0010:_raw_spin_lock_bh+0x1c/0x40 kernel/locking/spinlock.c:178
Code: 41 5d 41 5e 41 5f 5d c3 e8 71 ac f6 ff 90 41 56 53 49 89 fe 48 8b 5c 24 10 48 89 df be 01 02 00 00 e8 c8 e7 2c f7 49 8d 7e 18 <31> f6 31 d2 31 c9 41 b8 01 00 00 00 45 31 c9 53 e8 3f 0c 42 f7 48
RSP: 0018:ffffc900058c7b48 EFLAGS: 00000246
RAX: 775957eed3725900 RBX: ffffffff89f4c378 RCX: ffffffff8a203800
RDX: 1ffff110078b59b9 RSI: 0000000000000201 RDI: ffff8880834fdd58
RBP: ffff88801a595ba8 R08: dffffc0000000000 R09: fffffbfff1f76e31
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000400
R13: dffffc0000000000 R14: ffff8880834fdd40 R15: ffff88803c5acdd0
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f76f5ea2000 CR3: 00000000728e9000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 spin_lock_bh include/linux/spinlock.h:368 [inline]
 batadv_nc_purge_paths+0xe8/0x3b0 net/batman-adv/network-coding.c:446
 batadv_nc_worker+0x30b/0x5b0 net/batman-adv/network-coding.c:726
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2306
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2453
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/01 01:49 linux-5.15.y c957cbb87315 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in usb_deregister_dev
* Struck through repros no longer work on HEAD.