============================================ WARNING: possible recursive locking detected 6.8.0-rc3-syzkaller-00047-ged5551279c91 #0 Not tainted -------------------------------------------- kworker/1:3/12985 is trying to acquire lock: ffff88813d182b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: vb2_video_unregister_device drivers/media/common/videobuf2/videobuf2-v4l2.c:1269 [inline] ffff88813d182b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: vb2_video_unregister_device+0x12b/0x2d0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1245 but task is already holding lock: ffff88813d182b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: usbtv_video_free+0x28/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:3/12985: #0: ffff888102e84938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x789/0x15d0 kernel/workqueue.c:2608 #1: ffffc9000ab8fd80 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7eb/0x15d0 kernel/workqueue.c:2609 #2: ffff88810af53190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline] #2: ffff88810af53190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1be/0x4f40 drivers/usb/core/hub.c:5840 #3: ffff8881203d1190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline] #3: ffff8881203d1190 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0x10a/0x910 drivers/usb/core/hub.c:2287 #4: ffff8881087ed160 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline] #4: ffff8881087ed160 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1095 [inline] #4: ffff8881087ed160 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xa4/0x610 drivers/base/dd.c:1292 #5: ffff88813d182b70 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: usbtv_video_free+0x28/0x70 drivers/media/usb/usbtv/usbtv-video.c:966 #6: ffff88813d182ae0 (&usbtv->v4l2_lock){+.+.}-{3:3}, at: usbtv_video_free+0x32/0x70 drivers/media/usb/usbtv/usbtv-video.c:967 stack backtrace: CPU: 1 PID: 12985 Comm: kworker/1:3 Not tainted 6.8.0-rc3-syzkaller-00047-ged5551279c91 #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+0xd9/0x1b0 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3856 [inline] __lock_acquire+0x210a/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9d0 kernel/locking/mutex.c:752 vb2_video_unregister_device drivers/media/common/videobuf2/videobuf2-v4l2.c:1269 [inline] vb2_video_unregister_device+0x12b/0x2d0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1245 usbtv_video_free+0x4a/0x70 drivers/media/usb/usbtv/usbtv-video.c:970 usbtv_disconnect+0x5c/0xd0 drivers/media/usb/usbtv/usbtv-core.c:138 usb_unbind_interface+0x1e5/0x960 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] device_remove+0x11f/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295 bus_remove_device+0x22c/0x420 drivers/base/bus.c:574 device_del+0x39a/0xa50 drivers/base/core.c:3814 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416 usb_disconnect+0x2e1/0x910 drivers/usb/core/hub.c:2296 hub_port_connect drivers/usb/core/hub.c:5352 [inline] hub_port_connect_change drivers/usb/core/hub.c:5652 [inline] port_event drivers/usb/core/hub.c:5812 [inline] hub_event+0x1be0/0x4f40 drivers/usb/core/hub.c:5894 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242