[v6.1] INFO: task hung in usbdev_open

8 views
Skip to first unread message

syzbot

unread,
Apr 1, 2023, 3:55:42 AM4/1/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b29299e5f60 Linux 6.1.22
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=120f7eb9c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=bbb9a1f6f7f5a1d9
dashboard link: https://syzkaller.appspot.com/bug?extid=34ba91bf0a28be896ebe
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13fbbb71c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1433c6e1c80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2affbd06cbfd/disk-3b29299e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8b22d1baf827/vmlinux-3b29299e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d5e3891c88bf/Image-3b29299e.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+34ba91...@syzkaller.appspotmail.com

INFO: task syz-executor396:4360 blocked for more than 143 seconds.
Not tainted 6.1.22-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor396 state:D stack:0 pid:4360 ppid:4343 flags:0x00000001
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
schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6689
__mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
device_lock include/linux/device.h:836 [inline]
usbdev_open+0x13c/0x6c0 drivers/usb/core/devio.c:1042
chrdev_open+0x3e8/0x4fc fs/char_dev.c:414
do_dentry_open+0x734/0xfa0 fs/open.c:882
vfs_open+0x7c/0x90 fs/open.c:1013
do_open fs/namei.c:3557 [inline]
path_openat+0x1e14/0x2548 fs/namei.c:3714
do_filp_open+0x1bc/0x3cc fs/namei.c:3741
do_sys_openat2+0x128/0x3d8 fs/open.c:1310
do_sys_open fs/open.c:1326 [inline]
__do_sys_openat fs/open.c:1342 [inline]
__se_sys_openat fs/open.c:1337 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1337
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffff800015754a30 (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: ffff800015755230 (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: ffff800015754860 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:305
5 locks held by kworker/0:2/109:
#0: ffff0000c26a0d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2262
#1: ffff80001d737c20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2264
#2: ffff0000cee85190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
#2: ffff0000cee85190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1c0/0x44a0 drivers/usb/core/hub.c:5683
#3: ffff0000ce217190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
#3: ffff0000ce217190 (&dev->mutex){....}-{3:3}, at: __device_attach+0x90/0x480 drivers/base/dd.c:983
#4: ffff0000d42f3118 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
#4: ffff0000d42f3118 (&dev->mutex){....}-{3:3}, at: __device_attach+0x90/0x480 drivers/base/dd.c:983
2 locks held by getty/3992:
#0: ffff0000d4316098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
#1: ffff80001ca002f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1210 drivers/tty/n_tty.c:2177
4 locks held by udevd/4356:
#0: ffff0000d087d2f0 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xac/0xc44 fs/seq_file.c:182
#1: ffff0000cf642488 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x58/0x384 fs/kernfs/file.c:150
#2: ffff0000c1a6d830 (kn->active#9){.+.+}-{0:0}, at: kernfs_seq_start+0x74/0x384 fs/kernfs/file.c:151
#3: ffff0000ce217190 (&dev->mutex){....}-{3:3}, at: device_lock_interruptible include/linux/device.h:841 [inline]
#3: ffff0000ce217190 (&dev->mutex){....}-{3:3}, at: manufacturer_show+0x30/0xac drivers/usb/core/sysfs.c:141
1 lock held by syz-executor396/4360:
#0: ffff0000cee85190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:836 [inline]
#0: ffff0000cee85190 (&dev->mutex){....}-{3:3}, at: usbdev_open+0x13c/0x6c0 drivers/usb/core/devio.c:1042

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



---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 1, 2023, 7:58:45 AM4/1/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c957cbb87315 Linux 5.15.105
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15abce21c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=852dc3de44ba1f3f
dashboard link: https://syzkaller.appspot.com/bug?extid=3caba32a3e955196dbd2
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13df2435c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a1f259c80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/91d0cf1fc5fb/disk-c957cbb8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/346dc1169521/vmlinux-c957cbb8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f7005bdc0e20/Image-c957cbb8.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3caba3...@syzkaller.appspotmail.com

INFO: task syz-executor100:4100 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:syz-executor100 state:D stack: 0 pid: 4100 ppid: 4086 flags:0x00000001
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6514
__mutex_lock_common+0xba0/0x2154 kernel/locking/mutex.c:669
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
device_lock include/linux/device.h:760 [inline]
usbdev_open+0x13c/0x6ec drivers/usb/core/devio.c:1030
chrdev_open+0x3e8/0x4fc fs/char_dev.c:414
do_dentry_open+0x780/0xed8 fs/open.c:826
vfs_open+0x7c/0x90 fs/open.c:956
do_open fs/namei.c:3538 [inline]
path_openat+0x1f28/0x26f0 fs/namei.c:3672
do_filp_open+0x1a8/0x3b4 fs/namei.c:3699
do_sys_openat2+0x128/0x3d8 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_openat fs/open.c:1243 [inline]
__se_sys_openat fs/open.c:1238 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1238
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
5 locks held by kworker/0:0/7:
#0: ffff0000c27af538 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2279
#1: ffff8000188a7c00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2281
#2: ffff0000ccaee220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
#2: ffff0000ccaee220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1c8/0x48c4 drivers/usb/core/hub.c:5676
#3: ffff0000cfa6c220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
#3: ffff0000cfa6c220 (&dev->mutex){....}-{3:3}, at: __device_attach+0x90/0x480 drivers/base/dd.c:949
#4: ffff0000cfa6e1a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
#4: ffff0000cfa6e1a8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x90/0x480 drivers/base/dd.c:949
1 lock held by khungtaskd/27:
#0: ffff800014a91660 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:268
2 locks held by getty/3733:
#0: ffff0000d3ab0098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
#1: ffff80001a2ce2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1200 drivers/tty/n_tty.c:2147
4 locks held by udevd/4090:
#0: ffff0000c8314418 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xac/0xc44 fs/seq_file.c:182
#1: ffff0000d56e7c88 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x58/0x3a0 fs/kernfs/file.c:112
#2: ffff0000c170ebd0 (kn->active#65){++++}-{0:0}, at: kernfs_seq_start+0x74/0x3a0 fs/kernfs/file.c:113
#3: ffff0000cfa6c220 (&dev->mutex){....}-{3:3}, at: device_lock_interruptible include/linux/device.h:765 [inline]
#3: ffff0000cfa6c220 (&dev->mutex){....}-{3:3}, at: manufacturer_show+0x30/0xac drivers/usb/core/sysfs.c:141
1 lock held by syz-executor100/4100:
#0: ffff0000ccaee220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
#0: ffff0000ccaee220 (&dev->mutex){....}-{3:3}, at: usbdev_open+0x13c/0x6ec drivers/usb/core/devio.c:1030

syzbot

unread,
Jun 28, 2023, 1:12:26 PM6/28/23
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit d5dba4b7bf904143702fb4be641802ee2e9c95aa
Author: Alan Stern <st...@rowland.harvard.edu>
Date: Mon Apr 10 19:38:22 2023 +0000

USB: sisusbvga: Add endpoint checks

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15e2ca98a80000
start commit: a343b0dd87b4 Linux 6.1.30
git tree: linux-6.1.y
kernel config: https://syzkaller.appspot.com/x/.config?x=5265a3c898f3cbbb
dashboard link: https://syzkaller.appspot.com/bug?extid=34ba91bf0a28be896ebe
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1393f069280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12d2fa85280000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: USB: sisusbvga: Add endpoint checks

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages