openvswitch: netlink: Message has 4784 unknown bytes.
openvswitch: netlink: Flow actions may not be safe on all matching packets.
======================================================
WARNING: possible circular locking dependency detected
6.16.0-rc5-syzkaller-00193-g40f92e79b0aa #0 Not tainted
------------------------------------------------------
syz.6.1877/15490 is trying to acquire lock:
ffff8880211bc188 (&set->update_nr_hwq_lock){++++}-{4:4}, at: blk_mq_update_nr_hw_queues+0x3b/0x14c0

but task is already holding lock:
ffff8880211bc230 (&nbd->config_lock){+.+.}-{4:4}, at: nbd_ioctl+0x131/0xeb0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&nbd->config_lock){+.+.}-{4:4}:
       lock_acquire+0x120/0x360
       __mutex_lock+0x182/0xe80
       refcount_dec_and_mutex_lock+0x30/0xa0
       nbd_config_put+0x2c/0x790
       nbd_release+0xfe/0x140
       bdev_release+0x536/0x650
       blkdev_release+0x15/0x20
       __fput+0x44c/0xa70
       fput_close_sync+0x119/0x200
       __x64_sys_close+0x7f/0x110
       do_syscall_64+0xfa/0x3b0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&disk->open_mutex){+.+.}-{4:4}:
       lock_acquire+0x120/0x360
       __mutex_lock+0x182/0xe80
       __del_gendisk+0x129/0x9e0
       del_gendisk+0xe8/0x160
       sd_remove+0x8d/0x110
       device_release_driver_internal+0x4d9/0x7c0
       bus_remove_device+0x34d/0x410
       device_del+0x511/0x8e0
       __scsi_remove_device+0x1a7/0x3b0
       scsi_forget_host+0xd0/0x110
       scsi_remove_host+0x1b7/0x710
       usb_stor_disconnect+0x14f/0x1f0
       usb_unbind_interface+0x26e/0x8f0
       device_release_driver_internal+0x4d9/0x7c0
       bus_remove_device+0x34d/0x410
       device_del+0x511/0x8e0
       usb_disable_device+0x3e9/0x8a0
       usb_disconnect+0x330/0x950
       hub_event+0x1cdb/0x4a00
       process_scheduled_works+0xae1/0x17b0
       worker_thread+0x8a0/0xda0
       kthread+0x711/0x8a0
       ret_from_fork+0x3fc/0x770
       ret_from_fork_asm+0x1a/0x30

-> #0 (&set->update_nr_hwq_lock){++++}-{4:4}:
       validate_chain+0xb9b/0x2140
       __lock_acquire+0xab9/0xd20
       lock_acquire+0x120/0x360
       down_write+0x96/0x1f0
       blk_mq_update_nr_hw_queues+0x3b/0x14c0
       nbd_start_device+0x16c/0xac0
       nbd_ioctl+0x636/0xeb0
       blkdev_ioctl+0x5a8/0x6d0
       __se_sys_ioctl+0xfc/0x170
       do_syscall_64+0xfa/0x3b0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &set->update_nr_hwq_lock --> &disk->open_mutex --> &nbd->config_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&nbd->config_lock);
                               lock(&disk->open_mutex);
                               lock(&nbd->config_lock);
  lock(&set->update_nr_hwq_lock);

 *** DEADLOCK ***

1 lock held by syz.6.1877/15490:
 #0: ffff8880211bc230 (&nbd->config_lock){+.+.}-{4:4}, at: nbd_ioctl+0x131/0xeb0

stack backtrace:
CPU: 0 UID: 0 PID: 15490 Comm: syz.6.1877 Not tainted 6.16.0-rc5-syzkaller-00193-g40f92e79b0aa #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+0x189/0x250
 print_circular_bug+0x2ee/0x310
 check_noncircular+0x134/0x160
 validate_chain+0xb9b/0x2140
 __lock_acquire+0xab9/0xd20
 lock_acquire+0x120/0x360
 down_write+0x96/0x1f0
 blk_mq_update_nr_hw_queues+0x3b/0x14c0
 nbd_start_device+0x16c/0xac0
 nbd_ioctl+0x636/0xeb0
 blkdev_ioctl+0x5a8/0x6d0
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f379d58e9a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f379e3ae038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f379d7b5fa0 RCX: 00007f379d58e9a9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000009
RBP: 00007f379d610d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f379d7b5fa0 R15: 00007ffdca8062a8
 </TASK>
