====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L Y ------------------------------------------------------ syz.0.2265/16125 is trying to acquire lock: ffffffff8fd9a820 (cgroup_mutex){+.+.}-{4:4}, at: cgroup_lock include/linux/cgroup.h:485 [inline] ffffffff8fd9a820 (cgroup_mutex){+.+.}-{4:4}, at: cgroup_kn_lock_live+0x14f/0x260 kernel/cgroup/cgroup.c:1713 but task is already holding lock: ffff888055a5b0c0 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] ffff888055a5b0c0 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: vfs_rmdir+0xf8/0x6a0 fs/namei.c:5542 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&type->i_mutex_dir_key#6){++++}-{4:4}: down_read+0x45/0x320 kernel/locking/rwsem.c:1574 inode_lock_shared include/linux/fs.h:1039 [inline] lookup_slow+0x46/0x80 fs/namei.c:1935 ovl_lookup_positive_unlocked fs/overlayfs/namei.c:216 [inline] ovl_lookup_single+0x323/0xe90 fs/overlayfs/namei.c:260 ovl_lookup_layer+0x377/0x440 fs/overlayfs/namei.c:365 ovl_lookup_layers fs/overlayfs/namei.c:1168 [inline] ovl_lookup+0x9ae/0x1c80 fs/overlayfs/namei.c:1403 lookup_open+0x94b/0x1970 fs/namei.c:4559 open_last_lookups fs/namei.c:4798 [inline] path_openat+0x673/0x1da0 fs/namei.c:5037 do_file_open+0x23e/0x4a0 fs/namei.c:5069 do_sys_openat2+0x115/0x200 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_openat fs/open.c:1788 [inline] __se_sys_openat fs/open.c:1783 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1783 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 -> #4 (DCACHE_PAR_LOOKUP){+.+.}-{0:0}: d_wait_lookup fs/dcache.c:2840 [inline] __d_alloc_parallel+0xc32/0x1700 fs/dcache.c:2944 __lookup_slow+0x82/0x2f0 fs/namei.c:1904 lookup_slow+0x59/0x80 fs/namei.c:1936 walk_component fs/namei.c:2311 [inline] link_path_walk+0xd22/0x1910 fs/namei.c:2685 path_openat+0x1c4/0x1da0 fs/namei.c:5036 do_file_open+0x23e/0x4a0 fs/namei.c:5069 do_sys_openat2+0x115/0x200 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_openat fs/open.c:1788 [inline] __se_sys_openat fs/open.c:1783 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1783 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 -> #3 (&type->i_mutex_dir_key#5){++++}-{4:4}: down_read+0x45/0x320 kernel/locking/rwsem.c:1574 inode_lock_shared include/linux/fs.h:1039 [inline] lookup_slow+0x46/0x80 fs/namei.c:1935 walk_component fs/namei.c:2311 [inline] link_path_walk+0xd22/0x1910 fs/namei.c:2685 path_lookupat+0xe4/0x8c0 fs/namei.c:2841 filename_lookup+0x265/0x5d0 fs/namei.c:2871 kern_path+0x3d/0x150 fs/namei.c:3065 lookup_bdev block/bdev.c:1268 [inline] bdev_file_open_by_path+0xd5/0x4a0 block/bdev.c:1123 add_device drivers/mtd/devices/block2mtd.c:279 [inline] block2mtd_setup2+0x485/0xdd0 drivers/mtd/devices/block2mtd.c:459 block2mtd_setup+0x27/0xe0 drivers/mtd/devices/block2mtd.c:476 param_attr_store+0x214/0x310 kernel/params.c:591 module_attr_store+0x65/0x90 kernel/params.c:906 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x612/0xba0 fs/read_write.c:687 ksys_write+0x150/0x270 fs/read_write.c:1036 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 (param_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 ieee80211_rate_control_ops_get net/mac80211/rate.c:220 [inline] rate_control_alloc net/mac80211/rate.c:266 [inline] ieee80211_init_rate_ctrl_alg+0x16a/0x5d0 net/mac80211/rate.c:1015 ieee80211_register_hw+0x38e0/0x4b40 net/mac80211/main.c:1571 mac80211_hwsim_new_radio+0x3284/0x5750 drivers/net/wireless/virtual/mac80211_hwsim_main.c:6188 init_mac80211_hwsim+0x2a8/0x3d0 drivers/net/wireless/virtual/mac80211_hwsim_main.c:7728 do_one_initcall+0x250/0x870 init/main.c:1360 do_initcall_level+0x10a/0x1a0 init/main.c:1422 do_initcalls+0x59/0xa0 init/main.c:1438 kernel_init_freeable+0x29d/0x3e0 init/main.c:1673 kernel_init+0x22/0x1d0 init/main.c:1563 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 (rtnl_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 cgrp_css_online+0x91/0x300 net/core/netprio_cgroup.c:157 online_css+0xbf/0x310 kernel/cgroup/cgroup.c:5901 css_create kernel/cgroup/cgroup.c:5981 [inline] cgroup_apply_control_enable+0x9ed/0xda0 kernel/cgroup/cgroup.c:3474 cgroup_mkdir+0x1220/0x14b0 kernel/cgroup/cgroup.c:6186 kernfs_iop_mkdir+0x213/0x360 fs/kernfs/dir.c:1304 vfs_mkdir+0x40e/0x630 fs/namei.c:5452 filename_mkdirat+0x285/0x510 fs/namei.c:5485 __do_sys_mkdirat fs/namei.c:5506 [inline] __se_sys_mkdirat+0x35/0x150 fs/namei.c:5503 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 (cgroup_mutex){+.+.}-{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 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 cgroup_lock include/linux/cgroup.h:485 [inline] cgroup_kn_lock_live+0x14f/0x260 kernel/cgroup/cgroup.c:1713 cgroup_rmdir+0x23/0x2b0 kernel/cgroup/cgroup.c:6438 kernfs_iop_rmdir+0x1f2/0x330 fs/kernfs/dir.c:1322 vfs_rmdir+0x3e6/0x6a0 fs/namei.c:5557 filename_rmdir+0x292/0x520 fs/namei.c:5614 __do_sys_rmdir fs/namei.c:5637 [inline] __se_sys_rmdir+0x2e/0x140 fs/namei.c:5634 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 other info that might help us debug this: Chain exists of: cgroup_mutex --> DCACHE_PAR_LOOKUP --> &type->i_mutex_dir_key#6 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->i_mutex_dir_key#6); lock(DCACHE_PAR_LOOKUP); lock(&type->i_mutex_dir_key#6); lock(cgroup_mutex); *** DEADLOCK *** locks held by syz.0.2265/16125: 3, last CPU#0: #0: ffff888037e8e460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:527 #1: ffff8880779cd900 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline] #1: ffff8880779cd900 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2947 [inline] #1: ffff8880779cd900 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2971 [inline] #1: ffff8880779cd900 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: filename_rmdir+0x1cd/0x520 fs/namei.c:5607 #2: ffff888055a5b0c0 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] #2: ffff888055a5b0c0 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: vfs_rmdir+0xf8/0x6a0 fs/namei.c:5542 stack backtrace: CPU: 0 UID: 0 PID: 16125 Comm: syz.0.2265 Tainted: G L Y syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP, [Y]=FORCED_BIND Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 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 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 cgroup_lock include/linux/cgroup.h:485 [inline] cgroup_kn_lock_live+0x14f/0x260 kernel/cgroup/cgroup.c:1713 cgroup_rmdir+0x23/0x2b0 kernel/cgroup/cgroup.c:6438 kernfs_iop_rmdir+0x1f2/0x330 fs/kernfs/dir.c:1322 vfs_rmdir+0x3e6/0x6a0 fs/namei.c:5557 filename_rmdir+0x292/0x520 fs/namei.c:5614 __do_sys_rmdir fs/namei.c:5637 [inline] __se_sys_rmdir+0x2e/0x140 fs/namei.c:5634 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 RIP: 0033:0x7faaff79e1d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007faafd9d5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 00007faaffa26180 RCX: 00007faaff79e1d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00002000000003c0 RBP: 00007faaff835888 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007faaffa26218 R14: 00007faaffa26180 R15: 00007ffe3e098a58