Warning: Permanently added '10.128.0.89' (ED25519) to the list of known hosts. executing program [ 36.035623][ T5988] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5988 'syz-executor426' [ 36.062655][ T5988] loop0: detected capacity change from 0 to 4096 [ 36.074487][ T5988] ntfs: volume version 3.1. [ 36.157537][ T5988] syz-executor426 (5988): drop_caches: 1 [ 36.208217][ T5988] syz-executor426 (5988): drop_caches: 1 [ 36.214408][ T39] [ 36.215041][ T39] ====================================================== [ 36.216832][ T39] WARNING: possible circular locking dependency detected [ 36.218639][ T39] 6.5.0-rc7-syzkaller-gfe4469582053 #0 Not tainted [ 36.220288][ T39] ------------------------------------------------------ [ 36.222088][ T39] kworker/u4:2/39 is trying to acquire lock: [ 36.223699][ T39] ffff0000e0070940 (&rl->lock){++++}-{3:3}, at: ntfs_read_folio+0xf70/0x200c [ 36.226059][ T39] [ 36.226059][ T39] but task is already holding lock: [ 36.228011][ T39] ffff0000e0073310 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x64/0x7b4 [ 36.230457][ T39] [ 36.230457][ T39] which lock already depends on the new lock. [ 36.230457][ T39] [ 36.233223][ T39] [ 36.233223][ T39] the existing dependency chain (in reverse order) is: [ 36.235620][ T39] [ 36.235620][ T39] -> #1 (&ni->mrec_lock){+.+.}-{3:3}: [ 36.237650][ T39] __mutex_lock_common+0x190/0x21a0 [ 36.239125][ T39] mutex_lock_nested+0x2c/0x38 [ 36.240465][ T39] map_mft_record+0x64/0x7b4 [ 36.241774][ T39] ntfs_truncate+0x1d4/0x2118 [ 36.243090][ T39] ntfs_setattr+0x260/0x320 [ 36.244412][ T39] notify_change+0xa84/0xd20 [ 36.245718][ T39] do_truncate+0x1c0/0x28c [ 36.246972][ T39] path_openat+0x2130/0x27f8 [ 36.248294][ T39] do_filp_open+0x1bc/0x3cc [ 36.249581][ T39] do_sys_openat2+0x124/0x1b8 [ 36.250915][ T39] __arm64_sys_openat+0x1f0/0x240 [ 36.252353][ T39] invoke_syscall+0x98/0x2b8 [ 36.253708][ T39] el0_svc_common+0x130/0x23c [ 36.255036][ T39] do_el0_svc+0x48/0x58 [ 36.256239][ T39] el0_svc+0x58/0x16c [ 36.257399][ T39] el0t_64_sync_handler+0x84/0xfc [ 36.258791][ T39] el0t_64_sync+0x190/0x194 [ 36.260141][ T39] [ 36.260141][ T39] -> #0 (&rl->lock){++++}-{3:3}: [ 36.261958][ T39] __lock_acquire+0x3370/0x75e8 [ 36.263325][ T39] lock_acquire+0x23c/0x71c [ 36.264611][ T39] down_read+0x58/0x2fc [ 36.265773][ T39] ntfs_read_folio+0xf70/0x200c [ 36.267157][ T39] filemap_read_folio+0x14c/0x39c [ 36.268590][ T39] do_read_cache_folio+0x114/0x548 [ 36.269991][ T39] read_cache_page+0x6c/0x170 [ 36.271295][ T39] ntfs_sync_mft_mirror+0x1cc/0x1890 [ 36.272808][ T39] write_mft_record_nolock+0x100c/0x1630 [ 36.274529][ T39] write_mft_record+0x144/0x1bc [ 36.275884][ T39] __ntfs_write_inode+0x5cc/0xa78 [ 36.277336][ T39] ntfs_write_inode+0x68/0x90 [ 36.278708][ T39] __writeback_single_inode+0x5a8/0x146c [ 36.280271][ T39] writeback_sb_inodes+0x720/0xff0 [ 36.281703][ T39] wb_writeback+0x3f4/0xfc0 [ 36.283032][ T39] wb_workfn+0x37c/0xf9c [ 36.284229][ T39] process_one_work+0x800/0x1480 [ 36.285687][ T39] worker_thread+0x8e0/0xfe8 [ 36.287074][ T39] kthread+0x288/0x310 [ 36.288274][ T39] ret_from_fork+0x10/0x20 [ 36.289529][ T39] [ 36.289529][ T39] other info that might help us debug this: [ 36.289529][ T39] [ 36.292097][ T39] Possible unsafe locking scenario: [ 36.292097][ T39] [ 36.294110][ T39] CPU0 CPU1 [ 36.295500][ T39] ---- ---- [ 36.296898][ T39] lock(&ni->mrec_lock); [ 36.298023][ T39] lock(&rl->lock); [ 36.299717][ T39] lock(&ni->mrec_lock); [ 36.301451][ T39] rlock(&rl->lock); [ 36.302432][ T39] [ 36.302432][ T39] *** DEADLOCK *** [ 36.302432][ T39] [ 36.304497][ T39] 3 locks held by kworker/u4:2/39: [ 36.305856][ T39] #0: ffff0000c1e1e938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x6b4/0x1480 [ 36.308584][ T39] #1: ffff800092f67c20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x6f0/0x1480 [ 36.311575][ T39] #2: ffff0000e0073310 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x64/0x7b4 [ 36.314049][ T39] [ 36.314049][ T39] stack backtrace: [ 36.315595][ T39] CPU: 1 PID: 39 Comm: kworker/u4:2 Not tainted 6.5.0-rc7-syzkaller-gfe4469582053 #0 [ 36.318046][ T39] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 [ 36.320674][ T39] Workqueue: writeback wb_workfn (flush-7:0) [ 36.322168][ T39] Call trace: [ 36.322986][ T39] dump_backtrace+0x1b8/0x1e4 [ 36.324191][ T39] show_stack+0x2c/0x44 [ 36.325290][ T39] dump_stack_lvl+0xd0/0x124 [ 36.326408][ T39] dump_stack+0x1c/0x28 [ 36.327461][ T39] print_circular_bug+0x150/0x1b8 [ 36.328746][ T39] check_noncircular+0x310/0x404 [ 36.329982][ T39] __lock_acquire+0x3370/0x75e8 [ 36.331237][ T39] lock_acquire+0x23c/0x71c [ 36.332368][ T39] down_read+0x58/0x2fc [ 36.333438][ T39] ntfs_read_folio+0xf70/0x200c [ 36.334656][ T39] filemap_read_folio+0x14c/0x39c [ 36.335897][ T39] do_read_cache_folio+0x114/0x548 [ 36.337256][ T39] read_cache_page+0x6c/0x170 [ 36.338505][ T39] ntfs_sync_mft_mirror+0x1cc/0x1890 [ 36.339875][ T39] write_mft_record_nolock+0x100c/0x1630 [ 36.341340][ T39] write_mft_record+0x144/0x1bc [ 36.342617][ T39] __ntfs_write_inode+0x5cc/0xa78 [ 36.343867][ T39] ntfs_write_inode+0x68/0x90 [ 36.345039][ T39] __writeback_single_inode+0x5a8/0x146c [ 36.346447][ T39] writeback_sb_inodes+0x720/0xff0 [ 36.347793][ T39] wb_writeback+0x3f4/0xfc0 [ 36.348927][ T39] wb_workfn+0x37c/0xf9c [ 36.350012][ T39] process_one_work+0x800/0x1480 [ 36.351325][ T39] worker_thread+0x8e0/0xfe8 [ 36.352503][ T39] kthread+0x288/0x310 [ 36.353587][ T39] ret_from_fork+0x10/0x20