====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.4.31/6760 is trying to acquire lock: ffff0000c6f7e610 (sb_internal#3){.+.+}-{0:0}, at: ocfs2_setattr+0xa04/0x17a0 fs/ocfs2/file.c:1263 but task is already holding lock: ffff0000f8968660 (&oi->ip_alloc_sem){+.+.}-{4:4}, at: ocfs2_setattr+0x9f8/0x17a0 fs/ocfs2/file.c:1262 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&oi->ip_alloc_sem){+.+.}-{4:4}: down_write+0x50/0xc0 kernel/locking/rwsem.c:1590 ocfs2_try_remove_refcount_tree+0xb4/0x2d8 fs/ocfs2/refcounttree.c:932 ocfs2_xattr_set+0x460/0xe9c fs/ocfs2/xattr.c:3669 ocfs2_set_acl+0x574/0x628 fs/ocfs2/acl.c:254 ocfs2_iop_set_acl+0x190/0x25c fs/ocfs2/acl.c:286 set_posix_acl fs/posix_acl.c:954 [inline] vfs_remove_acl+0x408/0x664 fs/posix_acl.c:1241 ovl_do_remove_acl fs/overlayfs/overlayfs.h:355 [inline] ovl_workdir_create+0x43c/0x6f4 fs/overlayfs/super.c:364 ovl_make_workdir fs/overlayfs/super.c:679 [inline] ovl_get_workdir+0x2b4/0x1270 fs/overlayfs/super.c:837 ovl_fill_super+0x10d8/0x3118 fs/overlayfs/super.c:1468 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xb4/0x144 fs/super.c:1343 ovl_get_tree+0x28/0x38 fs/overlayfs/params.c:708 vfs_get_tree+0x90/0x28c fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x284/0x944 fs/namespace.c:3727 path_mount+0x5b4/0xdfc fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4215 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #3 (&oi->ip_xattr_sem){++++}-{4:4}: down_read+0x58/0x2f8 kernel/locking/rwsem.c:1537 ocfs2_init_acl+0x258/0x5f0 fs/ocfs2/acl.c:366 ocfs2_mknod+0x1028/0x1cf0 fs/ocfs2/namei.c:413 ocfs2_create+0x190/0x474 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3796 [inline] open_last_lookups fs/namei.c:3895 [inline] path_openat+0x12d8/0x2c40 fs/namei.c:4131 do_filp_open+0x18c/0x36c fs/namei.c:4161 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #2 (jbd2_handle){++++}-{0:0}: start_this_handle+0xe74/0x10dc fs/jbd2/transaction.c:444 jbd2__journal_start+0x288/0x51c fs/jbd2/transaction.c:501 jbd2_journal_start+0x3c/0x4c fs/jbd2/transaction.c:540 ocfs2_start_trans+0x368/0x6b0 fs/ocfs2/journal.c:374 ocfs2_shutdown_local_alloc+0x1ac/0x7e4 fs/ocfs2/localalloc.c:417 ocfs2_dismount_volume+0x1ec/0x8cc fs/ocfs2/super.c:1825 ocfs2_put_super+0xec/0x320 fs/ocfs2/super.c:1553 generic_shutdown_super+0x12c/0x2b8 fs/super.c:642 kill_block_super+0x44/0x90 fs/super.c:1722 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1327 __cleanup_mnt+0x20/0x30 fs/namespace.c:1334 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #1 (&journal->j_trans_barrier){.+.+}-{4:4}: down_read+0x58/0x2f8 kernel/locking/rwsem.c:1537 ocfs2_start_trans+0x35c/0x6b0 fs/ocfs2/journal.c:372 ocfs2_shutdown_local_alloc+0x1ac/0x7e4 fs/ocfs2/localalloc.c:417 ocfs2_dismount_volume+0x1ec/0x8cc fs/ocfs2/super.c:1825 ocfs2_put_super+0xec/0x320 fs/ocfs2/super.c:1553 generic_shutdown_super+0x12c/0x2b8 fs/super.c:642 kill_block_super+0x44/0x90 fs/super.c:1722 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1327 __cleanup_mnt+0x20/0x30 fs/namespace.c:1334 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #0 (sb_internal#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+0x1774/0x30a4 kernel/locking/lockdep.c:5237 lock_acquire+0x14c/0x2e0 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.h:1916 [inline] sb_start_intwrite include/linux/fs.h:2099 [inline] ocfs2_start_trans+0x1f4/0x6b0 fs/ocfs2/journal.c:370 ocfs2_setattr+0xa04/0x17a0 fs/ocfs2/file.c:1263 notify_change+0xa0c/0xcb8 fs/attr.c:546 ovl_do_notify_change fs/overlayfs/overlayfs.h:203 [inline] ovl_workdir_create+0x588/0x6f4 fs/overlayfs/super.c:374 ovl_make_workdir fs/overlayfs/super.c:679 [inline] ovl_get_workdir+0x2b4/0x1270 fs/overlayfs/super.c:837 ovl_fill_super+0x10d8/0x3118 fs/overlayfs/super.c:1468 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xb4/0x144 fs/super.c:1343 ovl_get_tree+0x28/0x38 fs/overlayfs/params.c:708 vfs_get_tree+0x90/0x28c fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x284/0x944 fs/namespace.c:3727 path_mount+0x5b4/0xdfc fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4215 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 other info that might help us debug this: Chain exists of: sb_internal#3 --> &oi->ip_xattr_sem --> &oi->ip_alloc_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->ip_alloc_sem); lock(&oi->ip_xattr_sem); lock(&oi->ip_alloc_sem); rlock(sb_internal#3); *** DEADLOCK *** 4 locks held by syz.4.31/6760: #0: ffff0000ddffe0e0 (&type->s_umount_key#62/1){+.+.}-{4:4}, at: alloc_super+0x168/0x7d4 fs/super.c:344 #1: ffff0000c6f7e420 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:508 #2: ffff0000f89689c0 (&sb->s_type->i_mutex_key#22){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline] #2: ffff0000f89689c0 (&sb->s_type->i_mutex_key#22){+.+.}-{4:4}, at: ovl_workdir_create+0x52c/0x6f4 fs/overlayfs/super.c:373 #3: ffff0000f8968660 (&oi->ip_alloc_sem){+.+.}-{4:4}, at: ocfs2_setattr+0x9f8/0x17a0 fs/ocfs2/file.c:1262 stack backtrace: CPU: 0 UID: 0 PID: 6760 Comm: syz.4.31 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 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+0x324/0x32c kernel/locking/lockdep.c:2043 check_noncircular+0x154/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+0x1774/0x30a4 kernel/locking/lockdep.c:5237 lock_acquire+0x14c/0x2e0 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.h:1916 [inline] sb_start_intwrite include/linux/fs.h:2099 [inline] ocfs2_start_trans+0x1f4/0x6b0 fs/ocfs2/journal.c:370 ocfs2_setattr+0xa04/0x17a0 fs/ocfs2/file.c:1263 notify_change+0xa0c/0xcb8 fs/attr.c:546 ovl_do_notify_change fs/overlayfs/overlayfs.h:203 [inline] ovl_workdir_create+0x588/0x6f4 fs/overlayfs/super.c:374 ovl_make_workdir fs/overlayfs/super.c:679 [inline] ovl_get_workdir+0x2b4/0x1270 fs/overlayfs/super.c:837 ovl_fill_super+0x10d8/0x3118 fs/overlayfs/super.c:1468 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xb4/0x144 fs/super.c:1343 ovl_get_tree+0x28/0x38 fs/overlayfs/params.c:708 vfs_get_tree+0x90/0x28c fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x284/0x944 fs/namespace.c:3727 path_mount+0x5b4/0xdfc fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4215 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 overlayfs: upper fs does not support tmpfile. overlayfs: upper fs does not support RENAME_WHITEOUT. overlayfs: upper fs missing required features.