====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc7-syzkaller-00060-g789b4a41c247 #0 Not tainted ------------------------------------------------------ syz-executor.3/12362 is trying to acquire lock: ffff888070fbb140 (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:127 [inline] (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}, at: open_xa_dir+0x127/0x840 fs/reiserfs/xattr.c:152 but task is already holding lock: ffff88806c06f090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x69/0xe0 fs/reiserfs/lock.c:78 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sbi->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12f/0x1350 kernel/locking/mutex.c:747 reiserfs_write_lock+0x79/0x100 fs/reiserfs/lock.c:27 reiserfs_mkdir+0x31c/0x990 fs/reiserfs/namei.c:831 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] open_xa_root fs/reiserfs/xattr.c:136 [inline] open_xa_dir+0x6a3/0x840 fs/reiserfs/xattr.c:152 xattr_lookup+0x21/0x3d0 fs/reiserfs/xattr.c:395 reiserfs_xattr_set_handle+0xfb/0xb00 fs/reiserfs/xattr.c:533 reiserfs_xattr_set+0x454/0x5b0 fs/reiserfs/xattr.c:633 trusted_set+0xa7/0xd0 fs/reiserfs/xattr_trusted.c:31 __vfs_setxattr+0x173/0x1e0 fs/xattr.c:203 __vfs_setxattr_noperm+0x129/0x5f0 fs/xattr.c:237 __vfs_setxattr_locked+0x1d3/0x260 fs/xattr.c:298 vfs_setxattr+0x143/0x340 fs/xattr.c:324 ovl_do_setxattr fs/overlayfs/overlayfs.h:255 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:267 [inline] ovl_make_workdir fs/overlayfs/super.c:1340 [inline] ovl_get_workdir fs/overlayfs/super.c:1444 [inline] ovl_fill_super+0x2276/0x7270 fs/overlayfs/super.c:2000 mount_nodev+0x64/0x120 fs/super.c:1426 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __ia32_sys_mount+0x282/0x300 fs/namespace.c:3571 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 -> #0 (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 down_write_nested+0x96/0x200 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:793 [inline] open_xa_root fs/reiserfs/xattr.c:127 [inline] open_xa_dir+0x127/0x840 fs/reiserfs/xattr.c:152 reiserfs_for_each_xattr+0x1ab/0x9a0 fs/reiserfs/xattr.c:252 reiserfs_delete_xattrs+0x20/0xa0 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x2e7/0x540 fs/reiserfs/inode.c:53 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1748 [inline] iput.part.0+0x50a/0x740 fs/inode.c:1774 iput+0x5c/0x80 fs/inode.c:1764 reiserfs_mkdir+0x859/0x990 fs/reiserfs/namei.c:873 vfs_mkdir+0x242/0x460 fs/namei.c:4038 do_mkdirat+0x28d/0x310 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __ia32_sys_mkdir+0xf6/0x140 fs/namei.c:4079 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->lock); lock(&type->i_mutex_dir_key#10/3); lock(&sbi->lock); lock(&type->i_mutex_dir_key#10/3); *** DEADLOCK *** 3 locks held by syz-executor.3/12362: #0: ffff88801a33a460 (sb_writers#16){.+.+}-{0:0}, at: filename_create+0xf1/0x4a0 fs/namei.c:3801 #1: ffff888070fb9d60 (&type->i_mutex_dir_key#10/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] #1: ffff888070fb9d60 (&type->i_mutex_dir_key#10/1){+.+.}-{3:3}, at: filename_create+0x1aa/0x4a0 fs/namei.c:3808 #2: ffff88806c06f090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x69/0xe0 fs/reiserfs/lock.c:78 stack backtrace: CPU: 3 PID: 12362 Comm: syz-executor.3 Not tainted 6.3.0-rc7-syzkaller-00060-g789b4a41c247 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 down_write_nested+0x96/0x200 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:793 [inline] open_xa_root fs/reiserfs/xattr.c:127 [inline] open_xa_dir+0x127/0x840 fs/reiserfs/xattr.c:152 reiserfs_for_each_xattr+0x1ab/0x9a0 fs/reiserfs/xattr.c:252 reiserfs_delete_xattrs+0x20/0xa0 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x2e7/0x540 fs/reiserfs/inode.c:53 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1748 [inline] iput.part.0+0x50a/0x740 fs/inode.c:1774 iput+0x5c/0x80 fs/inode.c:1764 reiserfs_mkdir+0x859/0x990 fs/reiserfs/namei.c:873 vfs_mkdir+0x242/0x460 fs/namei.c:4038 do_mkdirat+0x28d/0x310 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __ia32_sys_mkdir+0xf6/0x140 fs/namei.c:4079 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7fb2579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f8c5cc EFLAGS: 00000296 ORIG_RAX: 0000000000000027 RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 retq 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi