============================================ WARNING: possible recursive locking detected 6.14.0-rc2-syzkaller #0 Not tainted -------------------------------------------- syz.3.16/3546 is trying to acquire lock: ffff8881006ce948 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_dop_revalidate+0x4a/0x150 fs/kernfs/dir.c:1160 but task is already holding lock: ffff8881006ce948 (&root->kernfs_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:241 [inline] ffff8881006ce948 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_node_dentry+0x56/0x120 fs/kernfs/mount.c:223 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&root->kernfs_rwsem); lock(&root->kernfs_rwsem); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz.3.16/3546: #0: ffff888104ff0670 (&fc->uapi_mutex){+.+.}-{4:4}, at: __do_sys_fsconfig fs/fsopen.c:465 [inline] #0: ffff888104ff0670 (&fc->uapi_mutex){+.+.}-{4:4}, at: __se_sys_fsconfig+0x31e/0x4c0 fs/fsopen.c:344 #1: ffff8881053fa0e0 (&type->s_umount_key#46){+.+.}-{4:4}, at: __super_lock fs/super.c:56 [inline] #1: ffff8881053fa0e0 (&type->s_umount_key#46){+.+.}-{4:4}, at: super_lock+0x11c/0x170 fs/super.c:120 #2: ffff8881006ce948 (&root->kernfs_rwsem){++++}-{4:4}, at: class_rwsem_read_constructor include/linux/rwsem.h:241 [inline] #2: ffff8881006ce948 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_node_dentry+0x56/0x120 fs/kernfs/mount.c:223 stack backtrace: CPU: 0 UID: 0 PID: 3546 Comm: syz.3.16 Not tainted 6.14.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xa3/0x100 lib/dump_stack.c:120 print_deadlock_bug+0x244/0x260 kernel/locking/lockdep.c:3039 check_deadlock kernel/locking/lockdep.c:3091 [inline] validate_chain kernel/locking/lockdep.c:3893 [inline] __lock_acquire+0x10c4/0x2570 kernel/locking/lockdep.c:5228 lock_acquire+0xeb/0x270 kernel/locking/lockdep.c:5851 down_read+0x4a/0x440 kernel/locking/rwsem.c:1524 kernfs_dop_revalidate+0x4a/0x150 fs/kernfs/dir.c:1160 d_revalidate fs/namei.c:928 [inline] lookup_dcache fs/namei.c:1656 [inline] lookup_one_unlocked+0x73/0xf0 fs/namei.c:2966 lookup_one_positive_unlocked fs/namei.c:2997 [inline] lookup_positive_unlocked+0x18/0x50 fs/namei.c:3037 kernfs_node_dentry+0xa0/0x120 fs/kernfs/mount.c:242 cgroup_do_get_tree+0x165/0x1b0 kernel/cgroup/cgroup.c:2219 cgroup_get_tree+0x33/0xe0 kernel/cgroup/cgroup.c:2258 vfs_get_tree+0x24/0xb0 fs/super.c:1814 vfs_cmd_create+0x53/0xc0 fs/fsopen.c:225 __do_sys_fsconfig fs/fsopen.c:467 [inline] __se_sys_fsconfig+0x357/0x4c0 fs/fsopen.c:344 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa0/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb9ecf8cde9 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:00007fb9edd04038 EFLAGS: 00000246 ORIG_RAX: 00000000000001af RAX: ffffffffffffffda RBX: 00007fb9ed1a5fa0 RCX: 00007fb9ecf8cde9 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000003 RBP: 00007fb9ed00e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb9ed1a5fa0 R15: 00007fffceb90f08