======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
kworker/1:0/24 is trying to acquire lock:
ffffffff8e8837e0 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_cache_noprof+0x40/0x660

but task is already holding lock:
ffffffff8f1802e8 (gdp_mutex){+.+.}-{4:4}, at: get_device_parent+0x16f/0x3a0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #9 (gdp_mutex){+.+.}-{4:4}:
       __mutex_lock+0x19f/0x1300
       get_device_parent+0x16f/0x3a0
       device_add+0x2e1/0xb70
       device_create+0x269/0x300
       msr_device_create+0x33/0x50
       cpuhp_invoke_callback+0x445/0x860
       cpuhp_thread_fun+0x36b/0x780
       smpboot_thread_fn+0x541/0xa50
       kthread+0x388/0x470
       ret_from_fork+0x51e/0xb90
       ret_from_fork_asm+0x1a/0x30

-> #8 (cpuhp_state-up){+.+.}-{0:0}:
       cpuhp_thread_fun+0x127/0x780
       smpboot_thread_fn+0x541/0xa50
       kthread+0x388/0x470
       ret_from_fork+0x51e/0xb90
       ret_from_fork_asm+0x1a/0x30

-> #7 (cpu_hotplug_lock){++++}-{0:0}:
       cpus_read_lock+0x42/0x160
       static_key_slow_inc+0x12/0x30
       setup_udp_tunnel_sock+0x343/0x550
       l2tp_tunnel_register+0xda0/0x1460
       pppol2tp_connect+0x8b7/0x17c0
       __sys_connect+0x312/0x450
       __x64_sys_connect+0x7a/0x90
       do_syscall_64+0x14d/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #6 (sk_lock-AF_INET6){+.+.}-{0:0}:
       lock_sock_nested+0x48/0x100
       inet_shutdown+0x6a/0x390
       nbd_mark_nsock_dead+0x2e9/0x560
       sock_shutdown+0x15e/0x260
       nbd_clear_sock+0x24/0x170
       nbd_config_put+0x2dd/0x580
       nbd_genl_connect+0x19d5/0x1cf0
       genl_family_rcv_msg_doit+0x22a/0x330
       genl_rcv_msg+0x61c/0x7a0
       netlink_rcv_skb+0x232/0x4b0
       genl_rcv+0x28/0x40
       netlink_unicast+0x80f/0x9b0
       netlink_sendmsg+0x813/0xb40
       ____sys_sendmsg+0x972/0x9f0
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1bd/0x2a0
       do_syscall_64+0x14d/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #5 (&nsock->tx_lock){+.+.}-{4:4}:
       __mutex_lock+0x19f/0x1300
       nbd_queue_rq+0x37b/0x1100
       blk_mq_dispatch_rq_list+0xa70/0x1910
       __blk_mq_sched_dispatch_requests+0xdcc/0x1600
       blk_mq_sched_dispatch_requests+0xd7/0x190
       blk_mq_run_hw_queue+0x348/0x4f0
       blk_mq_dispatch_list+0xd16/0xe10
       blk_mq_flush_plug_list+0x48d/0x570
       __blk_flush_plug+0x3ed/0x4d0
       __submit_bio+0x28d/0x580
       submit_bio_noacct_nocheck+0x2f4/0xa70
       block_read_full_folio+0x7b7/0x830
       filemap_read_folio+0x137/0x3b0
       do_read_cache_folio+0x358/0x590
       read_part_sector+0xb6/0x2b0
       adfspart_check_ICS+0xa5/0xa40
       bdev_disk_changed+0x7ba/0x1550
       blkdev_get_whole+0x380/0x510
       bdev_open+0x31e/0xd30
       blkdev_open+0x470/0x610
       do_dentry_open+0x785/0x14e0
       vfs_open+0x3b/0x340
       path_openat+0x2e08/0x3860
       do_file_open+0x23e/0x4a0
       do_sys_openat2+0x113/0x200
       __x64_sys_openat+0x138/0x170
       do_syscall_64+0x14d/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #4 (&cmd->lock){+.+.}-{4:4}:
       __mutex_lock+0x19f/0x1300
       nbd_queue_rq+0xc6/0x1100
       blk_mq_dispatch_rq_list+0xa70/0x1910
       __blk_mq_sched_dispatch_requests+0xdcc/0x1600
       blk_mq_sched_dispatch_requests+0xd7/0x190
       blk_mq_run_hw_queue+0x348/0x4f0
       blk_mq_dispatch_list+0xd16/0xe10
       blk_mq_flush_plug_list+0x48d/0x570
       __blk_flush_plug+0x3ed/0x4d0
       __submit_bio+0x28d/0x580
       submit_bio_noacct_nocheck+0x2f4/0xa70
       block_read_full_folio+0x7b7/0x830
       filemap_read_folio+0x137/0x3b0
       do_read_cache_folio+0x358/0x590
       read_part_sector+0xb6/0x2b0
       adfspart_check_ICS+0xa5/0xa40
       bdev_disk_changed+0x7ba/0x1550
       blkdev_get_whole+0x380/0x510
       bdev_open+0x31e/0xd30
       blkdev_open+0x470/0x610
       do_dentry_open+0x785/0x14e0
       vfs_open+0x3b/0x340
       path_openat+0x2e08/0x3860
       do_file_open+0x23e/0x4a0
       do_sys_openat2+0x113/0x200
       __x64_sys_openat+0x138/0x170
       do_syscall_64+0x14d/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #3 (set->srcu){.+.+}-{0:0}:
       __synchronize_srcu+0xca/0x300
       elevator_switch+0x1e8/0x7a0
       elevator_change+0x2cc/0x450
       elevator_set_default+0x36c/0x430
       blk_register_queue+0x366/0x430
       __add_disk+0x677/0xd50
       add_disk_fwnode+0xfb/0x480
       nbd_dev_add+0x72c/0xb50
       nbd_init+0x168/0x1f0
       do_one_initcall+0x250/0x8d0
       do_initcall_level+0x104/0x190
       do_initcalls+0x59/0xa0
       kernel_init_freeable+0x2a6/0x3e0
       kernel_init+0x1d/0x1d0
       ret_from_fork+0x51e/0xb90
       ret_from_fork_asm+0x1a/0x30

-> #2 (&q->elevator_lock){+.+.}-{4:4}:
       __mutex_lock+0x19f/0x1300
       elevator_change+0x1b3/0x450
       elevator_set_none+0xb5/0x140
       blk_mq_update_nr_hw_queues+0x5e7/0x1a60
       nbd_start_device+0x17f/0xb10
       nbd_genl_connect+0x165b/0x1cf0
       genl_family_rcv_msg_doit+0x22a/0x330
       genl_rcv_msg+0x61c/0x7a0
       netlink_rcv_skb+0x232/0x4b0
       genl_rcv+0x28/0x40
       netlink_unicast+0x80f/0x9b0
       netlink_sendmsg+0x813/0xb40
       ____sys_sendmsg+0x972/0x9f0
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1bd/0x2a0
       do_syscall_64+0x14d/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&q->q_usage_counter(io)#49){++++}-{0:0}:
       blk_alloc_queue+0x546/0x680
       __blk_mq_alloc_disk+0x197/0x390
       nbd_dev_add+0x499/0xb50
       nbd_init+0x168/0x1f0
       do_one_initcall+0x250/0x8d0
       do_initcall_level+0x104/0x190
       do_initcalls+0x59/0xa0
       kernel_init_freeable+0x2a6/0x3e0
       kernel_init+0x1d/0x1d0
       ret_from_fork+0x51e/0xb90
       ret_from_fork_asm+0x1a/0x30

-> #0 (fs_reclaim){+.+.}-{0:0}:
       __lock_acquire+0x15a5/0x2cf0
       lock_acquire+0xf0/0x2e0
       fs_reclaim_acquire+0x71/0x100
       __kmalloc_cache_noprof+0x40/0x660
       get_device_parent+0x255/0x3a0
       device_add+0x2e1/0xb70
       wakeup_source_sysfs_add+0x1d3/0x2c0
       wakeup_source_register+0x18a/0x380
       device_wakeup_enable+0xd0/0x260
       usbhid_start+0x221a/0x24b0
       hid_hw_start+0x65/0x120
       hid_device_probe+0x416/0x7a0
       really_probe+0x267/0xaf0
       __driver_probe_device+0x18c/0x320
       driver_probe_device+0x4f/0x240
       __device_attach_driver+0x279/0x430
       bus_for_each_drv+0x258/0x2f0
       __device_attach+0x2c5/0x450
       device_initial_probe+0xa1/0xd0
       bus_probe_device+0x12a/0x220
       device_add+0x7b6/0xb70
       hid_add_device+0x272/0x3e0
       usbhid_probe+0xe3a/0x12f0
       usb_probe_interface+0x668/0xc90
       really_probe+0x267/0xaf0
       __driver_probe_device+0x18c/0x320
       driver_probe_device+0x4f/0x240
       __device_attach_driver+0x279/0x430
       bus_for_each_drv+0x258/0x2f0
       __device_attach+0x2c5/0x450
       device_initial_probe+0xa1/0xd0
       bus_probe_device+0x12a/0x220
       device_add+0x7b6/0xb70
       usb_set_configuration+0x1a87/0x2110
       usb_generic_driver_probe+0x8d/0x150
       usb_probe_device+0x1c4/0x3b0
       really_probe+0x267/0xaf0
       __driver_probe_device+0x18c/0x320
       driver_probe_device+0x4f/0x240
       __device_attach_driver+0x279/0x430
       bus_for_each_drv+0x258/0x2f0
       __device_attach+0x2c5/0x450
       device_initial_probe+0xa1/0xd0
       bus_probe_device+0x12a/0x220
       device_add+0x7b6/0xb70
       usb_new_device+0xa08/0x16f0
       hub_event+0x2a1c/0x4f30
       process_scheduled_works+0xb6e/0x18c0
       worker_thread+0xa53/0xfc0
       kthread+0x388/0x470
       ret_from_fork+0x51e/0xb90
       ret_from_fork_asm+0x1a/0x30

other info that might help us debug this:

Chain exists of:
  fs_reclaim --> cpuhp_state-up --> gdp_mutex

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(gdp_mutex);
                               lock(cpuhp_state-up);
                               lock(gdp_mutex);
  lock(fs_reclaim);

 *** DEADLOCK ***

8 locks held by kworker/1:0/24:
 #0: ffff8881680e9d48 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0xa52/0x18c0
 #1: ffffc900001e7c40 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0xa8d/0x18c0
 #2: ffff88810ad291e0 (&dev->mutex){....}-{4:4}, at: hub_event+0x17f/0x4f30
 #3: ffff8881a43ef1e0 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x450
 #4: ffff8881abc351a8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x450
 #5: ffff888198851a68 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x450
 #6: ffff888198f3a8f0 (&usbhid->mutex){+.+.}-{4:4}, at: usbhid_start+0xf9/0x24b0
 #7: ffffffff8f1802e8 (gdp_mutex){+.+.}-{4:4}, at: get_device_parent+0x16f/0x3a0

stack backtrace:
CPU: 1 UID: 0 PID: 24 Comm: kworker/1:0 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e1/0x300
 check_noncircular+0x12e/0x150
 __lock_acquire+0x15a5/0x2cf0
 lock_acquire+0xf0/0x2e0
 fs_reclaim_acquire+0x71/0x100
 __kmalloc_cache_noprof+0x40/0x660
 get_device_parent+0x255/0x3a0
 device_add+0x2e1/0xb70
 wakeup_source_sysfs_add+0x1d3/0x2c0
 wakeup_source_register+0x18a/0x380
 device_wakeup_enable+0xd0/0x260
 usbhid_start+0x221a/0x24b0
 hid_hw_start+0x65/0x120
 hid_device_probe+0x416/0x7a0
 really_probe+0x267/0xaf0
 __driver_probe_device+0x18c/0x320
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x279/0x430
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c5/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7b6/0xb70
 hid_add_device+0x272/0x3e0
 usbhid_probe+0xe3a/0x12f0
 usb_probe_interface+0x668/0xc90
 really_probe+0x267/0xaf0
 __driver_probe_device+0x18c/0x320
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x279/0x430
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c5/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7b6/0xb70
 usb_set_configuration+0x1a87/0x2110
 usb_generic_driver_probe+0x8d/0x150
 usb_probe_device+0x1c4/0x3b0
 really_probe+0x267/0xaf0
 __driver_probe_device+0x18c/0x320
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x279/0x430
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c5/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7b6/0xb70
 usb_new_device+0xa08/0x16f0
 hub_event+0x2a1c/0x4f30
 process_scheduled_works+0xb6e/0x18c0
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x51e/0xb90
 ret_from_fork_asm+0x1a/0x30
 </TASK>
hid-generic 0003:046D:C31C.0029: hidraw0: USB HID v8.00 Device [HID 046d:c31c] on usb-dummy_hcd.1-1/input0
