ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. overlayfs: upper fs does not support tmpfile. overlayfs: upper fs does not support RENAME_WHITEOUT. ====================================================== WARNING: possible circular locking dependency detected 5.11.0-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.15/4177 is trying to acquire lock: ffff888110544c08 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:773 [inline] ffff888110544c08 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: ocfs2_reserve_local_alloc_bits+0x62/0x420 fs/ocfs2/localalloc.c:637 but task is already holding lock: ffff88811053f0f8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_xattr_set+0x19f/0xe90 fs/ocfs2/xattr.c:3581 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&oi->ip_xattr_sem){++++}-{3:3}: down_write+0x20/0x60 kernel/locking/rwsem.c:1406 ocfs2_xattr_set_handle+0x14a/0x280 fs/ocfs2/xattr.c:3499 ocfs2_init_security_set+0x1b/0x20 fs/ocfs2/xattr.c:7300 ocfs2_mknod+0xad3/0xfe0 fs/ocfs2/namei.c:413 ocfs2_mkdir+0x4f/0x1a0 fs/ocfs2/namei.c:656 vfs_mkdir+0x150/0x200 fs/namei.c:3652 do_mkdirat+0x119/0x150 fs/namei.c:3675 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #3 (jbd2_handle){++++}-{0:0}: start_this_handle+0x18c/0x540 fs/jbd2/transaction.c:446 jbd2__journal_start+0xf2/0x1a0 fs/jbd2/transaction.c:503 jbd2_journal_start+0x14/0x20 fs/jbd2/transaction.c:542 ocfs2_start_trans+0x176/0x360 fs/ocfs2/journal.c:356 ocfs2_block_group_alloc fs/ocfs2/suballoc.c:683 [inline] ocfs2_reserve_suballoc_bits+0x1bf/0x1960 fs/ocfs2/suballoc.c:830 ocfs2_reserve_new_metadata_blocks+0x1c7/0x390 fs/ocfs2/suballoc.c:980 ocfs2_mknod+0x4c8/0xfe0 fs/ocfs2/namei.c:342 ocfs2_mkdir+0x4f/0x1a0 fs/ocfs2/namei.c:656 vfs_mkdir+0x150/0x200 fs/namei.c:3652 do_mkdirat+0x119/0x150 fs/namei.c:3675 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x23/0xc0 kernel/locking/rwsem.c:1353 ocfs2_start_trans+0x16b/0x360 fs/ocfs2/journal.c:354 ocfs2_block_group_alloc fs/ocfs2/suballoc.c:683 [inline] ocfs2_reserve_suballoc_bits+0x1bf/0x1960 fs/ocfs2/suballoc.c:830 ocfs2_reserve_new_metadata_blocks+0x1c7/0x390 fs/ocfs2/suballoc.c:980 ocfs2_mknod+0x4c8/0xfe0 fs/ocfs2/namei.c:342 ocfs2_mkdir+0x4f/0x1a0 fs/ocfs2/namei.c:656 vfs_mkdir+0x150/0x200 fs/namei.c:3652 do_mkdirat+0x119/0x150 fs/namei.c:3675 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (sb_internal#2){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1592 [inline] sb_start_intwrite include/linux/fs.h:1709 [inline] ocfs2_start_trans+0x109/0x360 fs/ocfs2/journal.c:352 ocfs2_mknod+0x565/0xfe0 fs/ocfs2/namei.c:356 ocfs2_mkdir+0x4f/0x1a0 fs/ocfs2/namei.c:656 vfs_mkdir+0x150/0x200 fs/namei.c:3652 do_mkdirat+0x119/0x150 fs/namei.c:3675 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:2868 [inline] check_prevs_add kernel/locking/lockdep.c:2993 [inline] validate_chain kernel/locking/lockdep.c:3608 [inline] __lock_acquire+0x114c/0x1b30 kernel/locking/lockdep.c:4832 lock_acquire kernel/locking/lockdep.c:5442 [inline] lock_acquire+0xc9/0x3f0 kernel/locking/lockdep.c:5407 down_write+0x20/0x60 kernel/locking/rwsem.c:1406 inode_lock include/linux/fs.h:773 [inline] ocfs2_reserve_local_alloc_bits+0x62/0x420 fs/ocfs2/localalloc.c:637 ocfs2_reserve_clusters_with_limit+0x198/0x470 fs/ocfs2/suballoc.c:1164 ocfs2_init_xattr_set_ctxt fs/ocfs2/xattr.c:3284 [inline] ocfs2_xattr_set+0xab8/0xe90 fs/ocfs2/xattr.c:3632 __vfs_setxattr+0x61/0x80 fs/xattr.c:177 __vfs_setxattr_noperm+0x6b/0x1f0 fs/xattr.c:208 vfs_setxattr+0x8a/0x160 fs/xattr.c:291 ovl_do_setxattr fs/overlayfs/overlayfs.h:197 [inline] ovl_make_workdir fs/overlayfs/super.c:1392 [inline] ovl_get_workdir fs/overlayfs/super.c:1483 [inline] ovl_fill_super+0x758/0x18d0 fs/overlayfs/super.c:2026 mount_nodev+0x3f/0x90 fs/super.c:1412 legacy_get_tree+0x2b/0x50 fs/fs_context.c:592 vfs_get_tree+0x1e/0x80 fs/super.c:1496 do_new_mount fs/namespace.c:2881 [inline] path_mount+0x2b1/0xc00 fs/namespace.c:3211 do_mount fs/namespace.c:3224 [inline] __do_sys_mount fs/namespace.c:3432 [inline] __se_sys_mount fs/namespace.c:3409 [inline] __x64_sys_mount+0xfe/0x140 fs/namespace.c:3409 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5 --> jbd2_handle --> &oi->ip_xattr_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->ip_xattr_sem); lock(jbd2_handle); lock(&oi->ip_xattr_sem); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5); *** DEADLOCK *** 4 locks held by syz.0.15/4177: #0: ffff888115a360e0 (&type->s_umount_key#48/1){+.+.}-{3:3}, at: alloc_super+0xd4/0x3b0 fs/super.c:229 #1: ffff888115b2d448 (sb_writers#12){.+.+}-{0:0}, at: ovl_make_workdir fs/overlayfs/super.c:1342 [inline] #1: ffff888115b2d448 (sb_writers#12){.+.+}-{0:0}, at: ovl_get_workdir fs/overlayfs/super.c:1483 [inline] #1: ffff888115b2d448 (sb_writers#12){.+.+}-{0:0}, at: ovl_fill_super+0x557/0x18d0 fs/overlayfs/super.c:2026 #2: ffff88811053f3c8 (&sb->s_type->i_mutex_key#17){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:773 [inline] #2: ffff88811053f3c8 (&sb->s_type->i_mutex_key#17){+.+.}-{3:3}, at: vfs_setxattr+0x6f/0x160 fs/xattr.c:290 #3: ffff88811053f0f8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_xattr_set+0x19f/0xe90 fs/ocfs2/xattr.c:3581 stack backtrace: CPU: 1 PID: 4177 Comm: syz.0.15 Not tainted 5.11.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x77/0x97 lib/dump_stack.c:120 check_noncircular+0xcc/0xe0 kernel/locking/lockdep.c:2117 check_prev_add kernel/locking/lockdep.c:2868 [inline] check_prevs_add kernel/locking/lockdep.c:2993 [inline] validate_chain kernel/locking/lockdep.c:3608 [inline] __lock_acquire+0x114c/0x1b30 kernel/locking/lockdep.c:4832 lock_acquire kernel/locking/lockdep.c:5442 [inline] lock_acquire+0xc9/0x3f0 kernel/locking/lockdep.c:5407 down_write+0x20/0x60 kernel/locking/rwsem.c:1406 inode_lock include/linux/fs.h:773 [inline] ocfs2_reserve_local_alloc_bits+0x62/0x420 fs/ocfs2/localalloc.c:637 ocfs2_reserve_clusters_with_limit+0x198/0x470 fs/ocfs2/suballoc.c:1164 ocfs2_init_xattr_set_ctxt fs/ocfs2/xattr.c:3284 [inline] ocfs2_xattr_set+0xab8/0xe90 fs/ocfs2/xattr.c:3632 __vfs_setxattr+0x61/0x80 fs/xattr.c:177 __vfs_setxattr_noperm+0x6b/0x1f0 fs/xattr.c:208 vfs_setxattr+0x8a/0x160 fs/xattr.c:291 ovl_do_setxattr fs/overlayfs/overlayfs.h:197 [inline] ovl_make_workdir fs/overlayfs/super.c:1392 [inline] ovl_get_workdir fs/overlayfs/super.c:1483 [inline] ovl_fill_super+0x758/0x18d0 fs/overlayfs/super.c:2026 mount_nodev+0x3f/0x90 fs/super.c:1412 legacy_get_tree+0x2b/0x50 fs/fs_context.c:592 vfs_get_tree+0x1e/0x80 fs/super.c:1496 do_new_mount fs/namespace.c:2881 [inline] path_mount+0x2b1/0xc00 fs/namespace.c:3211 do_mount fs/namespace.c:3224 [inline] __do_sys_mount fs/namespace.c:3432 [inline] __se_sys_mount fs/namespace.c:3409 [inline] __x64_sys_mount+0xfe/0x140 fs/namespace.c:3409 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fc284c8eef9 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:00007fc284710038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fc284e46f80 RCX: 00007fc284c8eef9 RDX: 0000000020000080 RSI: 00000000200000c0 RDI: 0000000000000000 RBP: 00007fc284d01b76 R08: 0000000020000500 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc284e46f80 R15: 00007ffc2aa88f08 overlayfs: upper fs missing required features.