loop0: detected capacity change from 0 to 512 EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.17/4911 is trying to acquire lock: ffff0000d8394410 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:493 but task is already holding lock: ffff0000f059a028 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:705 [inline] ffff0000f059a028 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_nlink_start+0xc8/0x350 fs/overlayfs/util.c:1173 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ovl_i_lock_key[depth]){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x164/0xed0 kernel/locking/mutex.c:820 mutex_lock_interruptible_nested+0x24/0x30 kernel/locking/mutex.c:898 ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:705 [inline] ovl_nlink_start+0xc8/0x350 fs/overlayfs/util.c:1173 ovl_rename_start fs/overlayfs/dir.c:1189 [inline] ovl_rename+0x3b0/0xf80 fs/overlayfs/dir.c:1363 vfs_rename+0xa78/0xd48 fs/namei.c:6064 filename_renameat2+0x660/0x72c fs/namei.c:6182 __do_sys_renameat2 fs/namei.c:6211 [inline] __se_sys_renameat2 fs/namei.c:6206 [inline] __arm64_sys_renameat2+0xec/0x11c fs/namei.c:6206 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:736 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:755 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #2 (&ovl_i_mutex_key[depth]/4){+.+.}-{4:4}: down_write_nested+0x58/0xcc kernel/locking/rwsem.c:1751 inode_lock_nested include/linux/fs.h:1074 [inline] lock_two_nondirectories+0xe8/0x148 fs/inode.c:1256 vfs_rename+0x600/0xd48 fs/namei.c:6027 filename_renameat2+0x660/0x72c fs/namei.c:6182 __do_sys_renameat2 fs/namei.c:6211 [inline] __se_sys_renameat2 fs/namei.c:6206 [inline] __arm64_sys_renameat2+0xec/0x11c fs/namei.c:6206 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:736 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:755 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #1 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}: down_write+0x50/0xc0 kernel/locking/rwsem.c:1625 inode_lock include/linux/fs.h:1029 [inline] lock_two_nondirectories+0xc4/0x148 fs/inode.c:1254 ext4_move_extents+0x194/0x3324 fs/ext4/move_extent.c:589 __ext4_ioctl fs/ext4/ioctl.c:1657 [inline] ext4_ioctl+0x2a10/0x4280 fs/ext4/ioctl.c:1922 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __arm64_sys_ioctl+0x14c/0x1c4 fs/ioctl.c:583 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:736 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:755 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #0 (sb_writers#3){.+.+}-{0:0}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x17c0/0x2ebc kernel/locking/lockdep.c:5237 lock_acquire+0x140/0x364 kernel/locking/lockdep.c:5868 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_write+0x5c/0x294 include/linux/fs/super.h:125 mnt_want_write+0x44/0x9c fs/namespace.c:493 ovl_want_write fs/overlayfs/util.c:38 [inline] ovl_nlink_start+0x154/0x350 fs/overlayfs/util.c:1177 ovl_rename_start fs/overlayfs/dir.c:1189 [inline] ovl_rename+0x3b0/0xf80 fs/overlayfs/dir.c:1363 vfs_rename+0xa78/0xd48 fs/namei.c:6064 filename_renameat2+0x660/0x72c fs/namei.c:6182 __do_sys_renameat2 fs/namei.c:6211 [inline] __se_sys_renameat2 fs/namei.c:6206 [inline] __arm64_sys_renameat2+0xec/0x11c fs/namei.c:6206 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:736 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:755 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 other info that might help us debug this: Chain exists of: sb_writers#3 --> &ovl_i_mutex_key[depth]/4 --> &ovl_i_lock_key[depth] Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ovl_i_lock_key[depth]); lock(&ovl_i_mutex_key[depth]/4); lock(&ovl_i_lock_key[depth]); rlock(sb_writers#3); *** DEADLOCK *** 5 locks held by syz.0.17/4911: #0: ffff0000ce09c410 (sb_writers#11){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:493 #1: ffff0000f059a7a8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1074 [inline] #1: ffff0000f059a7a8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3787 [inline] #1: ffff0000f059a7a8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: __start_renaming+0x144/0x344 fs/namei.c:3880 #2: ffff0000f0599cb8 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] #2: ffff0000f0599cb8 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}, at: lock_two_nondirectories+0xc4/0x148 fs/inode.c:1254 #3: ffff0000f059a230 (&ovl_i_mutex_key[depth]/4){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1074 [inline] #3: ffff0000f059a230 (&ovl_i_mutex_key[depth]/4){+.+.}-{4:4}, at: lock_two_nondirectories+0xe8/0x148 fs/inode.c:1256 #4: ffff0000f059a028 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:705 [inline] #4: ffff0000f059a028 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_nlink_start+0xc8/0x350 fs/overlayfs/util.c:1173 stack backtrace: CPU: 0 UID: 0 PID: 4911 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/02/2026 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x328/0x330 kernel/locking/lockdep.c:2043 check_noncircular+0x158/0x174 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x17c0/0x2ebc kernel/locking/lockdep.c:5237 lock_acquire+0x140/0x364 kernel/locking/lockdep.c:5868 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_write+0x5c/0x294 include/linux/fs/super.h:125 mnt_want_write+0x44/0x9c fs/namespace.c:493 ovl_want_write fs/overlayfs/util.c:38 [inline] ovl_nlink_start+0x154/0x350 fs/overlayfs/util.c:1177 ovl_rename_start fs/overlayfs/dir.c:1189 [inline] ovl_rename+0x3b0/0xf80 fs/overlayfs/dir.c:1363 vfs_rename+0xa78/0xd48 fs/namei.c:6064 filename_renameat2+0x660/0x72c fs/namei.c:6182 __do_sys_renameat2 fs/namei.c:6211 [inline] __se_sys_renameat2 fs/namei.c:6206 [inline] __arm64_sys_renameat2+0xec/0x11c fs/namei.c:6206 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:736 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:755 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594