Re: [syzbot] INFO: task hung in scsi_remove_host

From: Bart Van Assche
Date: Sun Aug 21 2022 - 17:21:21 EST


On 8/21/22 06:42, syzbot wrote:
INFO: task kworker/1:3:3625 blocked for more than 143 seconds.
Not tainted 6.0.0-rc1-syzkaller-00399-g15b3f48a4339 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:3 state:D stack:24520 pid: 3625 ppid: 2 flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5182 [inline]
__schedule+0xadf/0x52b0 kernel/sched/core.c:6494
schedule+0xda/0x1b0 kernel/sched/core.c:6570
scsi_remove_host+0x348/0x440 drivers/scsi/hosts.c:199
quiesce_and_remove_host drivers/usb/storage/usb.c:867 [inline]
usb_stor_disconnect+0x115/0x260 drivers/usb/storage/usb.c:1087
usb_unbind_interface+0x1d8/0x8e0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:520 [inline]
device_remove+0x11f/0x170 drivers/base/dd.c:512
__device_release_driver drivers/base/dd.c:1209 [inline]
device_release_driver_internal+0x4a1/0x700 drivers/base/dd.c:1235
bus_remove_device+0x2e3/0x590 drivers/base/bus.c:529
device_del+0x4f3/0xc80 drivers/base/core.c:3704
usb_disable_device+0x356/0x7a0 drivers/usb/core/message.c:1419
usb_disconnect.cold+0x259/0x6ed drivers/usb/core/hub.c:2235
hub_port_connect drivers/usb/core/hub.c:5197 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5497 [inline]
port_event drivers/usb/core/hub.c:5653 [inline]
hub_event+0x1f86/0x4610 drivers/usb/core/hub.c:5735
process_one_work+0x991/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2e4/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
Hi Ming,

Do you agree that the issue reported above should be fixed by reverting the
patch series "scsi: core: Call blk_mq_free_tag_set() earlier"?

Thanks,

Bart.