====================================================== WARNING: possible circular locking dependency detected 5.6.0-rc5-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor418/1804 is trying to acquire lock: ffffffff878ee860 (driver_lock){+.+.}, at: display_open+0x1f/0x220 drivers/media/rc/imon.c:503 but task is already holding lock: ffffffff8768a2c8 (minor_rwsem){++++}, at: usb_open+0x23/0x270 drivers/usb/core/file.c:39 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (minor_rwsem){++++}: down_write+0x92/0x150 kernel/locking/rwsem.c:1534 usb_register_dev drivers/usb/core/file.c:187 [inline] usb_register_dev+0x19d/0x740 drivers/usb/core/file.c:156 imon_init_display drivers/media/rc/imon.c:2388 [inline] imon_probe+0x24a0/0x2b89 drivers/media/rc/imon.c:2471 usb_probe_interface+0x310/0x800 drivers/usb/core/driver.c:374 really_probe+0x290/0xac0 drivers/base/dd.c:551 driver_probe_device+0x223/0x350 drivers/base/dd.c:724 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:831 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x217/0x390 drivers/base/dd.c:897 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1459/0x1bf0 drivers/base/core.c:2500 usb_set_configuration+0xe47/0x17d0 drivers/usb/core/message.c:2023 usb_generic_driver_probe+0x9d/0xe0 drivers/usb/core/generic.c:241 usb_probe_device+0xd9/0x230 drivers/usb/core/driver.c:272 really_probe+0x290/0xac0 drivers/base/dd.c:551 driver_probe_device+0x223/0x350 drivers/base/dd.c:724 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:831 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x217/0x390 drivers/base/dd.c:897 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1459/0x1bf0 drivers/base/core.c:2500 usb_new_device.cold+0x540/0xcd0 drivers/usb/core/hub.c:2548 hub_port_connect drivers/usb/core/hub.c:5195 [inline] hub_port_connect_change drivers/usb/core/hub.c:5335 [inline] port_event drivers/usb/core/hub.c:5481 [inline] hub_event+0x21cb/0x4300 drivers/usb/core/hub.c:5563 process_one_work+0x94b/0x1620 kernel/workqueue.c:2264 process_scheduled_works kernel/workqueue.c:2326 [inline] worker_thread+0x7ab/0xe20 kernel/workqueue.c:2412 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 -> #1 (&ictx->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x158/0x1360 kernel/locking/mutex.c:1103 imon_init_intf0 drivers/media/rc/imon.c:2233 [inline] imon_probe+0xf56/0x2b89 drivers/media/rc/imon.c:2432 usb_probe_interface+0x310/0x800 drivers/usb/core/driver.c:374 really_probe+0x290/0xac0 drivers/base/dd.c:551 driver_probe_device+0x223/0x350 drivers/base/dd.c:724 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:831 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x217/0x390 drivers/base/dd.c:897 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1459/0x1bf0 drivers/base/core.c:2500 usb_set_configuration+0xe47/0x17d0 drivers/usb/core/message.c:2023 usb_generic_driver_probe+0x9d/0xe0 drivers/usb/core/generic.c:241 usb_probe_device+0xd9/0x230 drivers/usb/core/driver.c:272 really_probe+0x290/0xac0 drivers/base/dd.c:551 driver_probe_device+0x223/0x350 drivers/base/dd.c:724 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:831 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x217/0x390 drivers/base/dd.c:897 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1459/0x1bf0 drivers/base/core.c:2500 usb_new_device.cold+0x540/0xcd0 drivers/usb/core/hub.c:2548 hub_port_connect drivers/usb/core/hub.c:5195 [inline] hub_port_connect_change drivers/usb/core/hub.c:5335 [inline] port_event drivers/usb/core/hub.c:5481 [inline] hub_event+0x21cb/0x4300 drivers/usb/core/hub.c:5563 process_one_work+0x94b/0x1620 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 -> #0 (driver_lock){+.+.}: check_prev_add kernel/locking/lockdep.c:2475 [inline] check_prevs_add kernel/locking/lockdep.c:2580 [inline] validate_chain kernel/locking/lockdep.c:2970 [inline] __lock_acquire+0x1f74/0x3b60 kernel/locking/lockdep.c:3954 lock_acquire+0x130/0x340 kernel/locking/lockdep.c:4484 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x158/0x1360 kernel/locking/mutex.c:1103 display_open+0x1f/0x220 drivers/media/rc/imon.c:503 usb_open+0x1df/0x270 drivers/usb/core/file.c:48 chrdev_open+0x219/0x5c0 fs/char_dev.c:414 do_dentry_open+0x494/0x1120 fs/open.c:797 do_last fs/namei.c:3490 [inline] path_openat+0x1222/0x32a0 fs/namei.c:3607 do_filp_open+0x192/0x260 fs/namei.c:3637 do_sys_openat2+0x54c/0x740 fs/open.c:1149 do_sys_open+0xc3/0x140 fs/open.c:1165 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: driver_lock --> &ictx->lock --> minor_rwsem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(minor_rwsem); lock(&ictx->lock); lock(minor_rwsem); lock(driver_lock); *** DEADLOCK *** 1 lock held by syz-executor418/1804: #0: ffffffff8768a2c8 (minor_rwsem){++++}, at: usb_open+0x23/0x270 drivers/usb/core/file.c:39 stack backtrace: CPU: 0 PID: 1804 Comm: syz-executor418 Not tainted 5.6.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xef/0x16e lib/dump_stack.c:118 check_noncircular+0x32e/0x3e0 kernel/locking/lockdep.c:1808 check_prev_add kernel/locking/lockdep.c:2475 [inline] check_prevs_add kernel/locking/lockdep.c:2580 [inline] validate_chain kernel/locking/lockdep.c:2970 [inline] __lock_acquire+0x1f74/0x3b60 kernel/locking/lockdep.c:3954 lock_acquire+0x130/0x340 kernel/locking/lockdep.c:4484 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x158/0x1360 kernel/locking/mutex.c:1103 display_open+0x1f/0x220 drivers/media/rc/imon.c:503 usb_open+0x1df/0x270 drivers/usb/core/file.c:48 chrdev_open+0x219/0x5c0 fs/char_dev.c:414 do_dentry_open+0x494/0x1120 fs/open.c:797 do_last fs/namei.c:3490 [inline] path_openat+0x1222/0x32a0 fs/namei.c:3607 do_filp_open+0x192/0x260 fs/namei.c:3637 do_sys_openat2+0x54c/0x740 fs/open.c:1149 do_sys_open+0xc3/0x140 fs/open.c:1165 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x402540 Code: 01 f0 ff ff 0f 83 40 0e 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 2d 7f 2d 00 00 75 14 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 14 0e 00 00 c3 48 83 ec 08 e8 7a 03 00 00 RSP: 002b:00007ffe7b45b768 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000402540 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 00007ffe7b45b780 RBP: 0000000000006e90 R08: 0000000000000000 R09: 000000000000000f R10: 0000000000000064 R11: 0000000000000246 R12: 00000000004037e0 R13: 0000000000403870 R14: 0000000000000000 R15: 0000000000000000 imon:display_open: could not find interface for minor 0