============================================ WARNING: possible recursive locking detected 6.8.0-rc5-syzkaller #0 Not tainted -------------------------------------------- kworker/0:0/8 is trying to acquire lock: ffff888022964b78 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: vb2_video_unregister_device+0x15f/0x230 drivers/media/common/videobuf2/videobuf2-v4l2.c:1269 but task is already holding lock: ffff888022964b78 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: usbtv_video_free+0x22/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/0:0/8: #0: ffff88801bad1d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2608 [inline] #0: ffff88801bad1d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1420 kernel/workqueue.c:2706 #1: ffffc900000d7d20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2608 [inline] #1: ffffc900000d7d20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1420 kernel/workqueue.c:2706 #2: ffff888023c22190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline] #2: ffff888023c22190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1fe/0x50f0 drivers/usb/core/hub.c:5811 #3: ffff88802955d190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline] #3: ffff88802955d190 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0x103/0x950 drivers/usb/core/hub.c:2258 #4: ffff88807a3cc160 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:990 [inline] #4: ffff88807a3cc160 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1095 [inline] #4: ffff88807a3cc160 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xce/0x7c0 drivers/base/dd.c:1292 #5: ffff888022964b78 (&usbtv->vb2q_lock){+.+.}-{3:3}, at: usbtv_video_free+0x22/0x70 drivers/media/usb/usbtv/usbtv-video.c:966 #6: ffff888022964ae8 (&usbtv->v4l2_lock){+.+.}-{3:3}, at: usbtv_video_free+0x33/0x70 drivers/media/usb/usbtv/usbtv-video.c:967 stack backtrace: CPU: 0 PID: 8 Comm: kworker/0:0 Not tainted 6.8.0-rc5-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+0x1e7/0x2e0 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain+0x15c0/0x58e0 kernel/locking/lockdep.c:3856 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 vb2_video_unregister_device+0x15f/0x230 drivers/media/common/videobuf2/videobuf2-v4l2.c:1269 usbtv_video_free+0x47/0x70 drivers/media/usb/usbtv/usbtv-video.c:970 usbtv_disconnect+0x6d/0xd0 drivers/media/usb/usbtv/usbtv-core.c:138 usb_unbind_interface+0x1d4/0x850 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x503/0x7c0 drivers/base/dd.c:1295 bus_remove_device+0x34f/0x420 drivers/base/bus.c:574 device_del+0x580/0xa30 drivers/base/core.c:3828 usb_disable_device+0x3bf/0x850 drivers/usb/core/message.c:1416 usb_disconnect+0x340/0x950 drivers/usb/core/hub.c:2267 hub_port_connect drivers/usb/core/hub.c:5323 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x1e62/0x50f0 drivers/usb/core/hub.c:5865 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787 kthread+0x2ef/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242