======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.65/5864 is trying to acquire lock:
ffff888103ff8a18 (&mdc800->io_lock){+.+.}-{4:4}, at: mdc800_device_open+0x2e/0x470

but task is already holding lock:
ffffffff90b09968 (minor_rwsem#2){++++}-{4:4}, at: usb_open+0x30/0x1e0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (minor_rwsem#2){++++}-{4:4}:
       down_write+0x96/0x200
       usb_register_dev+0x142/0x5e0
       mdc800_usb_probe+0xf96/0x18c0
       usb_probe_interface+0x788/0xe50
       really_probe+0x254/0xae0
       __driver_probe_device+0x1e8/0x360
       driver_probe_device+0x4f/0x240
       __device_attach_driver+0x270/0x410
       bus_for_each_drv+0x258/0x2f0
       __device_attach+0x2c4/0x450
       device_initial_probe+0xa1/0xd0
       bus_probe_device+0x12a/0x220
       device_add+0x7d7/0xb80
       usb_set_configuration+0x1bb5/0x2260
       usb_generic_driver_probe+0x8d/0x150
       usb_probe_device+0x1c3/0x3b0
       really_probe+0x254/0xae0
       __driver_probe_device+0x1e8/0x360
       driver_probe_device+0x4f/0x240
       __device_attach_driver+0x270/0x410
       bus_for_each_drv+0x258/0x2f0
       __device_attach+0x2c4/0x450
       device_initial_probe+0xa1/0xd0
       bus_probe_device+0x12a/0x220
       device_add+0x7d7/0xb80
       usb_new_device+0x9aa/0x1690
       hub_event+0x28e8/0x4d30
       process_scheduled_works+0xc3d/0x1630
       worker_thread+0xa47/0xfb0
       kthread+0x38b/0x480
       ret_from_fork+0x514/0xb70
       ret_from_fork_asm+0x1a/0x30

-> #0 (&mdc800->io_lock){+.+.}-{4:4}:
       __lock_acquire+0x164c/0x2de0
       lock_acquire+0x115/0x350
       __mutex_lock+0x19d/0x1550
       mdc800_device_open+0x2e/0x470
       usb_open+0x156/0x1e0
       chrdev_open+0x4d9/0x600
       do_dentry_open+0x816/0x1380
       vfs_open+0x3b/0x340
       path_openat+0x1443/0x1d60
       do_file_open+0x23e/0x4a0
       do_sys_openat2+0x115/0x200
       __x64_sys_openat+0x138/0x170
       do_syscall_64+0x166/0x520
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(minor_rwsem#2);
                               lock(&mdc800->io_lock);
                               lock(minor_rwsem#2);
  lock(&mdc800->io_lock);

 *** DEADLOCK ***

locks held by syz.2.65/5864: 1, last CPU#1:
 #0: ffffffff90b09968 (minor_rwsem#2){++++}-{4:4}, at: usb_open+0x30/0x1e0

stack backtrace:
CPU: 1 UID: 0 PID: 5864 Comm: syz.2.65 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e2/0x300
 check_noncircular+0x12f/0x150
 __lock_acquire+0x164c/0x2de0
 lock_acquire+0x115/0x350
 __mutex_lock+0x19d/0x1550
 mdc800_device_open+0x2e/0x470
 usb_open+0x156/0x1e0
 chrdev_open+0x4d9/0x600
 do_dentry_open+0x816/0x1380
 vfs_open+0x3b/0x340
 path_openat+0x1443/0x1d60
 do_file_open+0x23e/0x4a0
 do_sys_openat2+0x115/0x200
 __x64_sys_openat+0x138/0x170
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f13d875ea0e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f13d967cb28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f13d967d6c0 RCX: 00007f13d875ea0e
RDX: 0000000000000002 RSI: 00007f13d967cc00 RDI: ffffffffffffff9c
RBP: 00007f13d8835888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f13d8a26038 R14: 00007f13d8a25fa0 R15: 00007fff14d05358
 </TASK>
usb 2-1: request USB irq fails (submit_retval=-19).
