ntfs: (device loop1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel. ntfs: volume version 3.1. ====================================================== WARNING: possible circular locking dependency detected 6.7.0-rc7-syzkaller-00016-gf5837722ffec #0 Not tainted ------------------------------------------------------ syz-executor.1/13615 is trying to acquire lock: ffff88802fca1210 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x4c/0x630 fs/ntfs/mft.c:154 but task is already holding lock: ffff88802fca1180 (&rl->lock){++++}-{3:3}, at: ntfs_truncate+0x1e7/0x2880 fs/ntfs/inode.c:2378 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&rl->lock){++++}-{3:3}: lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 down_read+0xb1/0xa40 kernel/locking/rwsem.c:1526 ntfs_read_block fs/ntfs/aops.c:242 [inline] ntfs_read_folio+0x1308/0x23e0 fs/ntfs/aops.c:430 filemap_read_folio+0x19c/0x780 mm/filemap.c:2323 do_read_cache_folio+0x134/0x810 mm/filemap.c:3700 do_read_cache_page+0x30/0x200 mm/filemap.c:3766 read_mapping_page include/linux/pagemap.h:871 [inline] ntfs_map_page fs/ntfs/aops.h:75 [inline] ntfs_sync_mft_mirror+0x25f/0x1ae0 fs/ntfs/mft.c:480 write_mft_record_nolock+0x1155/0x18f0 fs/ntfs/mft.c:787 write_mft_record+0x149/0x310 fs/ntfs/mft.h:95 __ntfs_write_inode+0x703/0xbb0 fs/ntfs/inode.c:3052 write_inode fs/fs-writeback.c:1473 [inline] __writeback_single_inode+0x69b/0xfc0 fs/fs-writeback.c:1690 writeback_sb_inodes+0x8e3/0x1220 fs/fs-writeback.c:1916 wb_writeback+0x44d/0xc70 fs/fs-writeback.c:2092 wb_do_writeback fs/fs-writeback.c:2239 [inline] wb_workfn+0x400/0xfb0 fs/fs-writeback.c:2279 process_one_work kernel/workqueue.c:2627 [inline] process_scheduled_works+0x90f/0x1420 kernel/workqueue.c:2700 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2781 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 -> #0 (&ni->mrec_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x1909/0x5ab0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747 map_mft_record+0x4c/0x630 fs/ntfs/mft.c:154 ntfs_truncate+0x267/0x2880 fs/ntfs/inode.c:2383 ntfs_truncate_vfs fs/ntfs/inode.c:2864 [inline] ntfs_setattr+0x3f5/0x4d0 fs/ntfs/inode.c:2916 notify_change+0xb99/0xe60 fs/attr.c:499 do_truncate+0x220/0x300 fs/open.c:66 handle_truncate fs/namei.c:3280 [inline] do_open fs/namei.c:3626 [inline] path_openat+0x29e1/0x3290 fs/namei.c:3779 do_filp_open+0x234/0x490 fs/namei.c:3809 do_sys_openat2+0x13e/0x1d0 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] __x64_sys_openat+0x247/0x290 fs/open.c:1463 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rl->lock); lock(&ni->mrec_lock); lock(&rl->lock); lock(&ni->mrec_lock); *** DEADLOCK *** 3 locks held by syz-executor.1/13615: #0: ffff8880350ec418 (sb_writers#34){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:404 #1: ffff88802fca14f0 (&sb->s_type->i_mutex_key#48){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:802 [inline] #1: ffff88802fca14f0 (&sb->s_type->i_mutex_key#48){+.+.}-{3:3}, at: do_truncate+0x20c/0x300 fs/open.c:64 #2: ffff88802fca1180 (&rl->lock){++++}-{3:3}, at: ntfs_truncate+0x1e7/0x2880 fs/ntfs/inode.c:2378 stack backtrace: CPU: 0 PID: 13615 Comm: syz-executor.1 Not tainted 6.7.0-rc7-syzkaller-00016-gf5837722ffec #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 check_noncircular+0x366/0x490 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x1909/0x5ab0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747 map_mft_record+0x4c/0x630 fs/ntfs/mft.c:154 ntfs_truncate+0x267/0x2880 fs/ntfs/inode.c:2383 ntfs_truncate_vfs fs/ntfs/inode.c:2864 [inline] ntfs_setattr+0x3f5/0x4d0 fs/ntfs/inode.c:2916 notify_change+0xb99/0xe60 fs/attr.c:499 do_truncate+0x220/0x300 fs/open.c:66 handle_truncate fs/namei.c:3280 [inline] do_open fs/namei.c:3626 [inline] path_openat+0x29e1/0x3290 fs/namei.c:3779 do_filp_open+0x234/0x490 fs/namei.c:3809 do_sys_openat2+0x13e/0x1d0 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] __x64_sys_openat+0x247/0x290 fs/open.c:1463 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fb38827cce9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb388fa10c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fb38839bf80 RCX: 00007fb38827cce9 RDX: 0000000000103a42 RSI: 0000000020000380 RDI: ffffffffffffff9c RBP: 00007fb3882c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fb38839bf80 R15: 00007ffc18958ce8 ntfs: (device loop1): ntfs_cluster_alloc(): Failed to allocate clusters, aborting (error -28). ntfs: (device loop1): ntfs_attr_extend_allocation(): Cannot extend allocation of inode 0x43, attribute type 0x80, because the allocation of clusters failed with error code -28. ntfs: (device loop1): ntfs_write_block(): Writing beyond initialized size is not supported yet. Sorry.