loop0: detected capacity change from 0 to 4096 overlayfs: upper fs does not support tmpfile. overlayfs: upper fs does not support RENAME_WHITEOUT. ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.0.0/5326 is trying to acquire lock: ffff888047cb3430 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1217 [inline] ffff888047cb3430 (&ni->ni_lock/5){+.+.}-{4:4}, at: mi_read+0x2dd/0x5b0 fs/ntfs3/record.c:148 but task is already holding lock: ffff888047cb8100 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1217 [inline] ffff888047cb8100 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_link+0xf6/0x280 fs/ntfs3/namei.c:141 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ni->ni_lock/5); lock(&ni->ni_lock/5); *** DEADLOCK *** May be due to missing lock nesting notation 10 locks held by syz.0.0/5326: #0: ffff888012b10420 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:493 #1: ffff888047c363b8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1073 [inline] #1: ffff888047c363b8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2923 [inline] #1: ffff888047c363b8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2934 [inline] #1: ffff888047c363b8 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: filename_create+0x200/0x370 fs/namei.c:4922 #2: ffff888047c35e00 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1028 [inline] #2: ffff888047c35e00 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}, at: vfs_link+0x3b4/0x6e0 fs/namei.c:5735 #3: ffff888047c361a8 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:693 [inline] #3: ffff888047c361a8 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_nlink_start+0xd9/0x3e0 fs/overlayfs/util.c:1170 #4: ffff888012102420 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:493 #5: ffff888047cba830 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1073 [inline] #5: ffff888047cba830 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2923 [inline] #5: ffff888047cba830 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2934 [inline] #5: ffff888047cba830 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: start_creating+0xbe/0x100 fs/namei.c:3376 #6: ffff888047cb83a0 (&sb->s_type->i_mutex_key#25){++++}-{4:4}, at: inode_lock include/linux/fs.h:1028 [inline] #6: ffff888047cb83a0 (&sb->s_type->i_mutex_key#25){++++}-{4:4}, at: vfs_link+0x3b4/0x6e0 fs/namei.c:5735 #7: ffff888047cba590 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1222 [inline] #7: ffff888047cba590 (&ni->ni_lock#2/6){+.+.}-{4:4}, at: ntfs_link+0xdb/0x280 fs/ntfs3/namei.c:139 #8: ffff888047cb8100 (&ni->ni_lock/5){+.+.}-{4:4}, at: ni_lock fs/ntfs3/ntfs_fs.h:1217 [inline] #8: ffff888047cb8100 (&ni->ni_lock/5){+.+.}-{4:4}, at: ntfs_link+0xf6/0x280 fs/ntfs3/namei.c:141 #9: ffff888012106130 (&wnd->rw_lock/1){+.+.}-{4:4}, at: ntfs_look_free_mft+0x170/0xd70 fs/ntfs3/fsntfs.c:594 stack backtrace: CPU: 0 UID: 0 PID: 5326 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain kernel/locking/lockdep.c:3895 [inline] __lock_acquire+0x253f/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0xf0/0x2e0 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x19f/0x1300 kernel/locking/mutex.c:776 ni_lock fs/ntfs3/ntfs_fs.h:1217 [inline] mi_read+0x2dd/0x5b0 fs/ntfs3/record.c:148 mi_format_new+0x1a3/0x610 fs/ntfs3/record.c:434 ni_add_subrecord+0xd1/0x460 fs/ntfs3/frecord.c:323 ntfs_look_free_mft+0x4e1/0xd70 fs/ntfs3/fsntfs.c:738 ni_create_attr_list+0x94b/0x1450 fs/ntfs3/frecord.c:830 ni_ins_attr_ext+0x461/0xba0 fs/ntfs3/frecord.c:928 ni_insert_attr fs/ntfs3/frecord.c:1095 [inline] ni_insert_resident fs/ntfs3/frecord.c:1479 [inline] ni_add_name+0x6df/0xc90 fs/ntfs3/frecord.c:2756 ntfs_link_inode+0x134/0x150 fs/ntfs3/inode.c:1794 ntfs_link+0x118/0x280 fs/ntfs3/namei.c:146 vfs_link+0x518/0x6e0 fs/namei.c:5746 ovl_do_link fs/overlayfs/overlayfs.h:227 [inline] ovl_create_real+0x193/0x880 fs/overlayfs/dir.c:175 ovl_create_upper fs/overlayfs/dir.c:360 [inline] ovl_create_handle_whiteouts+0x567/0x1380 fs/overlayfs/dir.c:629 ovl_create_or_link+0xec/0x270 fs/overlayfs/dir.c:666 ovl_link+0x221/0x2a0 fs/overlayfs/dir.c:780 vfs_link+0x518/0x6e0 fs/namei.c:5746 filename_linkat+0x273/0x600 fs/namei.c:5814 __do_sys_linkat fs/namei.c:5840 [inline] __se_sys_linkat+0x60/0x2d0 fs/namei.c:5835 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f21b999c799 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f21ba7b2fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000109 RAX: ffffffffffffffda RBX: 00007f21b9c15fa0 RCX: 00007f21b999c799 RDX: 0000000000000007 RSI: 0000200000000300 RDI: 0000000000000007 RBP: 00007f21b9a32c99 R08: 0000000000000000 R09: 0000000000000000 R10: 0000200000000400 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f21b9c16038 R14: 00007f21b9c15fa0 R15: 00007ffdf96124b8