Re: [PATCH] ntfs: avoid stale runlist element dereference in fallocate

From: Cen Zhang

Date: Sat Jun 27 2026 - 00:16:21 EST


Hi Hyunchul,

>
> Looks good to me.
>
> Reviewed-by: Hyunchul Lee <hyc.lee@xxxxxxxxx>
>
> Additionally, we need to skip ntfs_dio_zero_range() if
> clusters are not allocated.
>
> @@ -5647,9 +5647,10 @@ int ntfs_attr_fallocate(struct ntfs_inode *ni,
> loff_t start, loff_t byte_len, bo
> if (err)
> goto out;
>
> - err = ntfs_dio_zero_range(VFS_I(ni),
> - lcn <<
> vol->cluster_size_bits,
> - alloc_cnt <<
> vol->cluster_size_bits);
> + if (balloc)
> + err = ntfs_dio_zero_range(VFS_I(ni),
> + lcn
> << vol->cluster_size_bits,
> +
> alloc_cnt << vol->cluster_size_bits);
>

Thanks for your review. I will fold that into v2 and I will keep your
Reviewed-by unless you prefer otherwise.

Best Regards,
Cen Zhang