[v5.15] INFO: task hung in blkdev_get_by_dev (3)

0 views
Skip to first unread message

syzbot

unread,
Jan 31, 2024, 7:39:31 PMJan 31
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6139f2a02fe0 Linux 5.15.148
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14ae1befe80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c3cfb017ec09dfb8
dashboard link: https://syzkaller.appspot.com/bug?extid=c4395209eafb4e4a1cb5
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/863dea226ad0/disk-6139f2a0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/db1a0715548e/vmlinux-6139f2a0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/edd9bd0f16ff/Image-6139f2a0.gz.xz

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

INFO: task udevd:4127 blocked for more than 144 seconds.
Not tainted 5.15.148-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd state:D stack: 0 pid: 4127 ppid: 3589 flags:0x0000000c
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5030 [inline]
__schedule+0xf10/0x1e48 kernel/sched/core.c:6376
schedule+0x11c/0x1c8 kernel/sched/core.c:6459
schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6518
__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
blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
blkdev_open+0x10c/0x274 block/fops.c:463
do_dentry_open+0x780/0xed8 fs/open.c:826
vfs_open+0x7c/0x90 fs/open.c:956
do_open fs/namei.c:3614 [inline]
path_openat+0x1f28/0x26f0 fs/namei.c:3748
do_filp_open+0x1a8/0x3b4 fs/namei.c:3775
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:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor.2:18667 blocked for more than 144 seconds.
Not tainted 5.15.148-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2 state:D stack: 0 pid:18667 ppid: 4014 flags:0x00000005
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5030 [inline]
__schedule+0xf10/0x1e48 kernel/sched/core.c:6376
schedule+0x11c/0x1c8 kernel/sched/core.c:6459
io_schedule+0x8c/0x194 kernel/sched/core.c:8484
wait_on_page_bit_common+0x6fc/0xc14 mm/filemap.c:1356
wait_on_page_bit mm/filemap.c:1417 [inline]
wait_on_page_locked include/linux/pagemap.h:688 [inline]
wait_on_page_read mm/filemap.c:3437 [inline]
do_read_cache_page+0x760/0x950 mm/filemap.c:3480
read_cache_page+0x68/0x84 mm/filemap.c:3574
read_mapping_page include/linux/pagemap.h:515 [inline]
read_part_sector+0xe8/0x4d8 block/partitions/core.c:724
adfspart_check_ICS+0xd4/0x5d0 block/partitions/acorn.c:360
check_partition block/partitions/core.c:148 [inline]
blk_add_partitions block/partitions/core.c:609 [inline]
bdev_disk_changed+0x83c/0x1358 block/partitions/core.c:695
blkdev_get_whole+0x2a0/0x344 block/bdev.c:682
blkdev_get_by_dev+0x238/0x89c block/bdev.c:824
blkdev_open+0x10c/0x274 block/fops.c:463
do_dentry_open+0x780/0xed8 fs/open.c:826
vfs_open+0x7c/0x90 fs/open.c:956
do_open fs/namei.c:3614 [inline]
path_openat+0x1f28/0x26f0 fs/namei.c:3748
do_filp_open+0x1a8/0x3b4 fs/namei.c:3775
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:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor.2:18671 blocked for more than 144 seconds.
Not tainted 5.15.148-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2 state:D stack: 0 pid:18671 ppid: 4014 flags:0x0000000d
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5030 [inline]
__schedule+0xf10/0x1e48 kernel/sched/core.c:6376
schedule+0x11c/0x1c8 kernel/sched/core.c:6459
schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6518
__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
blkdev_put+0xe0/0x6b0 block/bdev.c:912
blkdev_close+0x74/0xb0 block/fops.c:475
__fput+0x30c/0x7f0 fs/file_table.c:280
____fput+0x20/0x30 fs/file_table.c:308
task_work_run+0x130/0x1e4 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by khungtaskd/27:
#0: ffff800014af15e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:268
3 locks held by kworker/u4:1/136:
2 locks held by kworker/u4:5/1621:
1 lock held by udevd/3589:
2 locks held by getty/3730:
#0: ffff0000d3338098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
#1: ffff80001a30b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1204 drivers/tty/n_tty.c:2158
4 locks held by syz-executor.1/4007:
1 lock held by udevd/4127:
#0: ffff0000cc0fc118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
6 locks held by kworker/1:11/8033:
#0: ffff0000c285fd38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
#1: ffff80001d407c00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
#2: ffff0000ce934220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
#2: ffff0000ce934220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1b8/0x47d4 drivers/usb/core/hub.c:5751
#3: ffff0000ce9375d8 (&port_dev->status_lock){+.+.}-{3:3}, at: usb_lock_port drivers/usb/core/hub.c:3108 [inline]
#3: ffff0000ce9375d8 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect drivers/usb/core/hub.c:5333 [inline]
#3: ffff0000ce9375d8 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect_change drivers/usb/core/hub.c:5577 [inline]
#3: ffff0000ce9375d8 (&port_dev->status_lock){+.+.}-{3:3}, at: port_event drivers/usb/core/hub.c:5723 [inline]
#3: ffff0000ce9375d8 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_event+0x1aec/0x47d4 drivers/usb/core/hub.c:5805
#4: ffff0000ce0f5a68 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect drivers/usb/core/hub.c:5334 [inline]
#4: ffff0000ce0f5a68 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect_change drivers/usb/core/hub.c:5577 [inline]
#4: ffff0000ce0f5a68 (hcd->address0_mutex){+.+.}-{3:3}, at: port_event drivers/usb/core/hub.c:5723 [inline]
#4: ffff0000ce0f5a68 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_event+0x1b10/0x47d4 drivers/usb/core/hub.c:5805
#5: ffff80001602e570 (ehci_cf_port_reset_rwsem){.+.+}-{3:3}, at: hub_port_reset+0x198/0x17dc drivers/usb/core/hub.c:2970
1 lock held by syz-executor.2/18667:
#0: ffff0000cc0fc118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
1 lock held by syz-executor.2/18671:
#0: ffff0000cc0fc118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xe0/0x6b0 block/bdev.c:912
2 locks held by syz-executor.2/18999:
1 lock held by syz-executor.0/19770:
#0: ffff0000cc0fc118 (&disk->open_mutex){+.+.}-{3:3}, at: sync_bdevs+0x150/0x280 block/bdev.c:1050
2 locks held by syz-executor.3/23584:

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



---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages