usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: syz usb 1-1: Manufacturer: syz usb 1-1: SerialNumber: syz usb 1-1: config 0 descriptor?? usbtv 1-1:0.0: Fushicai USBTV007 Audio-Video Grabber usb 1-1: USB disconnect, device number 2 ============================================ WARNING: possible recursive locking detected 6.7.0-rc2-syzkaller #0 Not tainted -------------------------------------------- kworker/1:2/2216 is trying to acquire lock: ffff88810eb81b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: vb2_video_unregister_device+0x6a/0xb0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1272 but task is already holding lock: ffff88810eb81b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: usbtv_video_free+0x1d/0x70 drivers/media/usb/usbtv/usbtv-video.c:966 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&usbtv->vb2q_lock); lock(&usbtv->vb2q_lock); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by kworker/1:2/2216: #0: ffff88810425ef38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #0: ffff88810425ef38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x1f2/0x4d0 kernel/workqueue.c:2703 #1: ffffc90000e5fe58 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #1: ffffc90000e5fe58 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x1f2/0x4d0 kernel/workqueue.c:2703 #2: ffff88810ca6b190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:992 [inline] #2: ffff88810ca6b190 (&dev->mutex){....}-{3:3}, at: hub_event+0x7e/0x1b20 drivers/usb/core/hub.c:5791 #3: ffff888119608990 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:992 [inline] #3: ffff888119608990 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0x80/0x290 drivers/usb/core/hub.c:2251 #4: ffff88811960f160 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:992 [inline] #4: ffff88811960f160 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1095 [inline] #4: ffff88811960f160 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x47/0x2a0 drivers/base/dd.c:1292 #5: ffff88810eb81b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: usbtv_video_free+0x1d/0x70 drivers/media/usb/usbtv/usbtv-video.c:966 #6: ffff88810eb81ae0 (&usbtv->v4l2_lock){+.+.}-{3:3}, at: usbtv_video_free+0x2e/0x70 drivers/media/usb/usbtv/usbtv-video.c:967 stack backtrace: CPU: 1 PID: 2216 Comm: kworker/1:2 Not tainted 6.7.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8d/0xe0 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x10ba/0x2490 kernel/locking/lockdep.c:5136 lock_acquire+0xea/0x270 kernel/locking/lockdep.c:5753 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x99/0x9a0 kernel/locking/mutex.c:747 vb2_video_unregister_device+0x6a/0xb0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1272 usbtv_video_free+0x42/0x70 drivers/media/usb/usbtv/usbtv-video.c:970 usbtv_disconnect+0x2c/0x50 drivers/media/usb/usbtv/usbtv-core.c:138 usb_unbind_interface+0xb7/0x260 drivers/usb/core/driver.c:458 device_remove drivers/base/dd.c:569 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x1a4/0x2a0 drivers/base/dd.c:1295 bus_remove_device+0x147/0x190 drivers/base/bus.c:574 device_del+0x22b/0x370 drivers/base/core.c:3814 usb_disable_device+0x78/0x1f0 drivers/usb/core/message.c:1416 usb_disconnect+0xfc/0x290 drivers/usb/core/hub.c:2260 hub_port_connect drivers/usb/core/hub.c:5303 [inline] hub_port_connect_change drivers/usb/core/hub.c:5603 [inline] port_event drivers/usb/core/hub.c:5763 [inline] hub_event+0xc2f/0x1b20 drivers/usb/core/hub.c:5845 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x250/0x4d0 kernel/workqueue.c:2703 worker_thread+0x23d/0x300 kernel/workqueue.c:2784 kthread+0xe9/0x100 kernel/kthread.c:388 ret_from_fork+0x32/0x40 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242