====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ kworker/u9:2/5592 is trying to acquire lock: ffff88813ff77238 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x4e/0x140 fs/kernfs/dir.c:1792 but task is already holding lock: ffff88813ff77348 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x3f/0x140 fs/kernfs/dir.c:1791 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #10 (&root->kernfs_supers_rwsem){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 kernfs_remove_by_name_ns+0x3f/0x140 fs/kernfs/dir.c:1791 kernfs_remove_by_name include/linux/kernfs.h:644 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0x101/0x2e0 fs/sysfs/group.c:328 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:352 __kobject_del+0x83/0x320 lib/kobject.c:595 kobject_del+0x45/0x60 lib/kobject.c:627 irq_sysfs_del kernel/irq/irqdesc.c:380 [inline] free_desc+0x10d/0x3d0 kernel/irq/irqdesc.c:493 irq_free_descs+0x7e/0xb0 kernel/irq/irqdesc.c:874 lan78xx_remove_irq_domain drivers/net/usb/lan78xx.c:2262 [inline] lan78xx_bind+0xa4f/0xd30 drivers/net/usb/lan78xx.c:3834 lan78xx_probe+0x1056/0x1c20 drivers/net/usb/lan78xx.c:4751 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x254/0xae0 drivers/base/dd.c:706 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026 bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500 __device_attach+0x2c7/0x450 drivers/base/dd.c:1098 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x12d/0x220 drivers/base/bus.c:620 device_add+0x7d7/0xb80 drivers/base/core.c:3776 usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x254/0xae0 drivers/base/dd.c:706 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026 bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500 __device_attach+0x2c7/0x450 drivers/base/dd.c:1098 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x12d/0x220 drivers/base/bus.c:620 device_add+0x7d7/0xb80 drivers/base/core.c:3776 usb_new_device+0x99a/0x1680 drivers/usb/core/hub.c:2708 hub_port_connect drivers/usb/core/hub.c:5580 [inline] hub_port_connect_change drivers/usb/core/hub.c:5720 [inline] port_event drivers/usb/core/hub.c:5884 [inline] hub_event+0x28cf/0x4cf0 drivers/usb/core/hub.c:5966 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #9 (sparse_irq_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:580 cpuhp_bringup_ap+0x70/0x360 kernel/cpu.c:841 cpuhp_invoke_callback+0x434/0x810 kernel/cpu.c:194 __cpuhp_invoke_callback_range kernel/cpu.c:972 [inline] cpuhp_invoke_callback_range kernel/cpu.c:996 [inline] cpuhp_up_callbacks kernel/cpu.c:1027 [inline] _cpu_up+0x2ce/0x5b0 kernel/cpu.c:1674 cpu_up+0x1d2/0x220 kernel/cpu.c:1706 cpuhp_bringup_mask+0xb2/0x1a0 kernel/cpu.c:1772 cpuhp_bringup_cpus_parallel+0x118/0x120 kernel/cpu.c:1863 bringup_nonboot_cpus+0x17/0x30 kernel/cpu.c:1876 smp_init+0x32/0x110 kernel/smp.c:1125 kernel_init_freeable+0x27f/0x3e0 init/main.c:1667 kernel_init+0x22/0x1d0 init/main.c:1565 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #8 (cpu_hotplug_lock){++++}-{0:0}: percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read include/linux/percpu-rwsem.h:77 [inline] cpus_read_lock+0x42/0x160 kernel/cpu.c:490 static_key_slow_inc+0x12/0x30 kernel/jump_label.c:190 udp_tunnel_encap_enable include/net/udp_tunnel.h:234 [inline] setup_udp_tunnel_sock+0x2eb/0x4f0 net/ipv4/udp_tunnel_core.c:90 gtp_encap_enable_socket+0x3d3/0x5c0 drivers/net/gtp.c:1708 gtp_encap_enable drivers/net/gtp.c:1729 [inline] gtp_newlink+0x636/0x16e0 drivers/net/gtp.c:1528 rtnl_newlink_create+0x305/0x7b0 net/core/rtnetlink.c:3974 __rtnl_newlink net/core/rtnetlink.c:4103 [inline] rtnl_newlink+0x166d/0x1c30 net/core/rtnetlink.c:4220 rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7137 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2575 netlink_unicast_kernel net/netlink/af_netlink.c:1338 [inline] netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1364 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] ____sys_sendmsg+0x565/0x870 net/socket.c:2713 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2767 __sys_sendmsg net/socket.c:2799 [inline] __do_sys_sendmsg net/socket.c:2804 [inline] __se_sys_sendmsg net/socket.c:2802 [inline] __x64_sys_sendmsg+0x1b7/0x290 net/socket.c:2802 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #7 (sk_lock-AF_INET){+.+.}-{0:0}: lock_sock_nested+0x41/0x130 net/core/sock.c:3837 lock_sock include/net/sock.h:1713 [inline] inet_shutdown+0x6a/0x390 net/ipv4/af_inet.c:913 nbd_mark_nsock_dead+0x2cb/0x550 drivers/block/nbd.c:319 recv_work+0x1d0c/0x1e40 drivers/block/nbd.c:1030 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #6 (&nsock->tx_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:580 nbd_handle_cmd drivers/block/nbd.c:1143 [inline] nbd_queue_rq+0x373/0x1000 drivers/block/nbd.c:1207 blk_mq_dispatch_rq_list+0x4af/0x1a00 block/blk-mq.c:2117 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xd45/0x1590 block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xda/0x1a0 block/blk-mq-sched.c:329 blk_mq_run_work_fn+0x16f/0x300 block/blk-mq.c:2532 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #5 (&cmd->lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:580 nbd_queue_rq+0xc1/0x1000 drivers/block/nbd.c:1199 blk_mq_dispatch_rq_list+0x4af/0x1a00 block/blk-mq.c:2117 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:168 [inline] blk_mq_do_dispatch_sched block/blk-mq-sched.c:182 [inline] __blk_mq_sched_dispatch_requests+0xd45/0x1590 block/blk-mq-sched.c:307 blk_mq_sched_dispatch_requests+0xda/0x1a0 block/blk-mq-sched.c:329 blk_mq_run_work_fn+0x16f/0x300 block/blk-mq.c:2532 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #4 (set->srcu){.+.+}-{0:0}: srcu_lock_sync include/linux/srcu.h:210 [inline] __synchronize_srcu+0xc9/0x2f0 kernel/rcu/srcutree.c:1462 elevator_switch+0x1e8/0x7b0 block/elevator.c:576 elevator_change+0x2fa/0x480 block/elevator.c:681 elevator_set_default+0x375/0x440 block/elevator.c:754 blk_register_queue+0x3f3/0x4e0 block/blk-sysfs.c:992 __add_disk+0x6b8/0xdb0 block/genhd.c:531 add_disk_fwnode+0x100/0x3a0 block/genhd.c:600 add_disk include/linux/blkdev.h:798 [inline] nbd_dev_add+0x733/0xb60 drivers/block/nbd.c:2026 nbd_init+0x168/0x1f0 drivers/block/nbd.c:2743 do_one_initcall+0x250/0x870 init/main.c:1362 do_initcall_level+0x10a/0x1a0 init/main.c:1424 do_initcalls+0x59/0xa0 init/main.c:1440 kernel_init_freeable+0x29d/0x3e0 init/main.c:1675 kernel_init+0x22/0x1d0 init/main.c:1565 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 (&q->elevator_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:580 elevator_change+0x1af/0x480 block/elevator.c:679 elv_iosched_store+0x504/0x630 block/elevator.c:826 queue_attr_store+0x207/0x2b0 block/blk-sysfs.c:906 kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61e/0xbb0 fs/read_write.c:687 ksys_write+0x156/0x270 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&q->q_usage_counter(io)#17){++++}-{0:0}: blk_alloc_queue+0x54c/0x690 block/blk-core.c:504 blk_mq_alloc_queue block/blk-mq.c:4420 [inline] __blk_mq_alloc_disk+0x194/0x390 block/blk-mq.c:4467 loop_add+0x480/0xb50 drivers/block/loop.c:2073 loop_init+0xd7/0x160 drivers/block/loop.c:2312 do_one_initcall+0x250/0x870 init/main.c:1362 do_initcall_level+0x10a/0x1a0 init/main.c:1424 do_initcalls+0x59/0xa0 init/main.c:1440 kernel_init_freeable+0x29d/0x3e0 init/main.c:1675 kernel_init+0x22/0x1d0 init/main.c:1565 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4375 [inline] fs_reclaim_acquire+0x71/0x100 mm/page_alloc.c:4389 might_alloc include/linux/sched/mm.h:316 [inline] slab_pre_alloc_hook mm/slub.c:4636 [inline] slab_alloc_node mm/slub.c:4974 [inline] kmem_cache_alloc_lru_noprof+0x60/0x680 mm/slub.c:5029 alloc_inode+0xb8/0x1b0 fs/inode.c:340 iget_locked+0x131/0x6a0 fs/inode.c:1473 kernfs_get_inode+0x4f/0x770 fs/kernfs/inode.c:250 kernfs_fill_super fs/kernfs/mount.c:308 [inline] kernfs_get_tree+0x5cd/0x980 fs/kernfs/mount.c:392 vfs_get_tree+0x92/0x2a0 fs/super.c:1933 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3772 [inline] do_new_mount+0x319/0xdc0 fs/namespace.c:3848 do_mount fs/namespace.c:4181 [inline] __do_sys_mount fs/namespace.c:4397 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4374 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&root->kernfs_rwsem){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 down_write+0x3a/0x50 kernel/locking/rwsem.c:1631 kernfs_remove_by_name_ns+0x4e/0x140 fs/kernfs/dir.c:1792 kernfs_remove_by_name include/linux/kernfs.h:644 [inline] sysfs_unmerge_group+0xd3/0x140 fs/sysfs/group.c:408 dpm_sysfs_remove+0x5f/0xd0 drivers/base/power/sysfs.c:830 device_del+0x250/0x8f0 drivers/base/core.c:3940 device_unregister+0x21/0xf0 drivers/base/core.c:4006 hci_conn_cleanup net/bluetooth/hci_conn.c:170 [inline] hci_conn_del+0xc3d/0x1200 net/bluetooth/hci_conn.c:1331 hci_abort_conn_sync+0xdd0/0x1190 net/bluetooth/hci_sync.c:6014 hci_cmd_sync_work+0x20b/0x3f0 net/bluetooth/hci_sync.c:332 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Chain exists of: &root->kernfs_rwsem --> sparse_irq_lock --> &root->kernfs_supers_rwsem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(&root->kernfs_supers_rwsem); lock(sparse_irq_lock); lock(&root->kernfs_supers_rwsem); lock(&root->kernfs_rwsem); *** DEADLOCK *** locks held by kworker/u9:2/5592: 5, last CPU#0: #0: ffff888037e7d938 ((wq_completion)hci3){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #0: ffff888037e7d938 ((wq_completion)hci3){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffff888037e7d938 ((wq_completion)hci3){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline] #0: ffff888037e7d938 ((wq_completion)hci3){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479 #1: ffffc90005257c40 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #1: ffffc90005257c40 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffc90005257c40 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline] #1: ffffc90005257c40 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479 #2: ffff88803b770f80 (&hdev->req_lock){+.+.}-{4:4}, at: hci_cmd_sync_work+0x1cb/0x3f0 net/bluetooth/hci_sync.c:331 #3: ffff88803b7700b0 (&hdev->lock){+.+.}-{4:4}, at: hci_abort_conn_sync+0xa6f/0x1190 net/bluetooth/hci_sync.c:5995 #4: ffff88813ff77348 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x3f/0x140 fs/kernfs/dir.c:1791 stack backtrace: CPU: 0 UID: 0 PID: 5592 Comm: kworker/u9:2 Tainted: G L syzkaller #0 PREEMPT_{RT,(lazy)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: hci3 hci_cmd_sync_work Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 down_write+0x3a/0x50 kernel/locking/rwsem.c:1631 kernfs_remove_by_name_ns+0x4e/0x140 fs/kernfs/dir.c:1792 kernfs_remove_by_name include/linux/kernfs.h:644 [inline] sysfs_unmerge_group+0xd3/0x140 fs/sysfs/group.c:408 dpm_sysfs_remove+0x5f/0xd0 drivers/base/power/sysfs.c:830 device_del+0x250/0x8f0 drivers/base/core.c:3940 device_unregister+0x21/0xf0 drivers/base/core.c:4006 hci_conn_cleanup net/bluetooth/hci_conn.c:170 [inline] hci_conn_del+0xc3d/0x1200 net/bluetooth/hci_conn.c:1331 hci_abort_conn_sync+0xdd0/0x1190 net/bluetooth/hci_sync.c:6014 hci_cmd_sync_work+0x20b/0x3f0 net/bluetooth/hci_sync.c:332 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245