====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L Y ------------------------------------------------------ syz.7.5425/18672 is trying to acquire lock: ffffffff8f19ca60 (cgroup_mutex){+.+.}-{4:4}, at: cgroup_lock include/linux/cgroup.h:485 [inline] ffffffff8f19ca60 (cgroup_mutex){+.+.}-{4:4}, at: cgroup_kn_lock_live+0x14f/0x260 kernel/cgroup/cgroup.c:1729 but task is already holding lock: ffff888079b5b580 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] ffff888079b5b580 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: vfs_rmdir+0xf8/0x6a0 fs/namei.c:5513 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:4530 open_last_lookups fs/namei.c:4769 [inline] path_openat+0x673/0x1da0 fs/namei.c:5008 do_file_open+0x23e/0x4a0 fs/namei.c:5040 do_sys_openat2+0x115/0x200 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_openat fs/open.c:1464 [inline] __se_sys_openat fs/open.c:1459 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1459 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:2838 [inline] __d_alloc_parallel+0xc32/0x1700 fs/dcache.c:2942 __lookup_slow+0x82/0x2f0 fs/namei.c:1904 lookup_slow+0x59/0x80 fs/namei.c:1936 walk_component fs/namei.c:2282 [inline] link_path_walk+0xd22/0x1910 fs/namei.c:2656 path_openat+0x1c4/0x1da0 fs/namei.c:5007 do_file_open+0x23e/0x4a0 fs/namei.c:5040 do_sys_openat2+0x115/0x200 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_openat fs/open.c:1464 [inline] __se_sys_openat fs/open.c:1459 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1459 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:2282 [inline] link_path_walk+0xd22/0x1910 fs/namei.c:2656 path_lookupat+0xe4/0x8c0 fs/namei.c:2812 filename_lookup+0x265/0x5d0 fs/namei.c:2842 kern_path+0x3d/0x150 fs/namei.c:3036 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: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 (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:1566 mac80211_hwsim_new_radio+0x3264/0x5720 drivers/net/wireless/virtual/mac80211_hwsim_main.c:6179 init_mac80211_hwsim+0x2a8/0x3d0 drivers/net/wireless/virtual/mac80211_hwsim_main.c:7718 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+0xbd/0x2e0 kernel/cgroup/cgroup.c:5889 css_create kernel/cgroup/cgroup.c:5967 [inline] cgroup_apply_control_enable+0x9ed/0xda0 kernel/cgroup/cgroup.c:3478 cgroup_mkdir+0xe66/0x10f0 kernel/cgroup/cgroup.c:6168 kernfs_iop_mkdir+0x213/0x360 fs/kernfs/dir.c:1304 vfs_mkdir+0x40e/0x630 fs/namei.c:5423 filename_mkdirat+0x285/0x510 fs/namei.c:5456 __do_sys_mkdirat fs/namei.c:5477 [inline] __se_sys_mkdirat+0x35/0x150 fs/namei.c:5474 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:1729 cgroup_rmdir+0x23/0x2b0 kernel/cgroup/cgroup.c:6420 kernfs_iop_rmdir+0x1f2/0x330 fs/kernfs/dir.c:1322 vfs_rmdir+0x3e6/0x6a0 fs/namei.c:5528 filename_rmdir+0x292/0x520 fs/namei.c:5585 __do_sys_rmdir fs/namei.c:5608 [inline] __se_sys_rmdir+0x2e/0x140 fs/namei.c:5605 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.7.5425/18672: 3, last CPU#1: #0: ffff88807f2b4460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:505 #1: ffff888076dbd440 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline] #1: ffff888076dbd440 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2918 [inline] #1: ffff888076dbd440 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2942 [inline] #1: ffff888076dbd440 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: filename_rmdir+0x1cd/0x520 fs/namei.c:5578 #2: ffff888079b5b580 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] #2: ffff888079b5b580 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: vfs_rmdir+0xf8/0x6a0 fs/namei.c:5513 stack backtrace: CPU: 1 UID: 0 PID: 18672 Comm: syz.7.5425 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:1729 cgroup_rmdir+0x23/0x2b0 kernel/cgroup/cgroup.c:6420 kernfs_iop_rmdir+0x1f2/0x330 fs/kernfs/dir.c:1322 vfs_rmdir+0x3e6/0x6a0 fs/namei.c:5528 filename_rmdir+0x292/0x520 fs/namei.c:5585 __do_sys_rmdir fs/namei.c:5608 [inline] __se_sys_rmdir+0x2e/0x140 fs/namei.c:5605 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:0x7efd4f99e159 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:00007efd5083b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 00007efd4fc25fa0 RCX: 00007efd4f99e159 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000080 RBP: 00007efd4fa3506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007efd4fc26038 R14: 00007efd4fc25fa0 R15: 00007ffcda195738