From: Hyunchul Lee <hyc.lee@gmail.com>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: linkinjeon@kernel.org, liubaolin12138@163.com,
ernest.borowski.git@proton.me, ntfs@lists.linux.dev,
linux-kernel@vger.kernel.org, zhanxusheng@xiaomi.com,
syzbot@syzkaller.appspotmail.com, stable@vger.kernel.org
Subject: Re: [PATCH] ntfs: map a read past the end of the runlist as a hole
Date: Thu, 3 Dec 2026 10:18:53 +0900 [thread overview]
Message-ID: <axDDfVgUEmSoO1Te@hyunchul-PC02> (raw)
In-Reply-To: <20261202072445.1975205-1-zhanxusheng1024@gmail.com>
On Wed, Dec 02, 2026 at 03:24:45PM +0800, Zhan Xusheng wrote:
> From: Zhan Xusheng <zhanxusheng@xiaomi.com>
>
> ntfs_read_iomap_begin_non_resident() maps at most the rest of the run
> holding the offset. At or past the allocated size,
> ntfs_attr_vcn_to_rl() returns the end of the runlist, whose length is 0,
> so the rest of the run comes out negative and is returned as the length
> of the mapping:
>
> WARNING: fs/iomap/iter.c:39 at iomap_iter
> iomap_readahead
> ntfs_readahead
> read_pages
> page_cache_ra_unbounded
> do_page_cache_ra
> page_cache_ra_order
> filemap_fault
>
> Readahead gets there when the file shrinks after the readahead window
> was sized from i_size. "ntfs: trim the sizes after a short write"
> makes that easy to hit: a write that runs out of space is rolled back
> to what it wrote while a MAP_POPULATE mmap() of the file faults it in.
>
> Map the range past the end of the runlist as a hole.
>
> Fixes: b041ca562526 ("ntfs: update iomap and address space operations")
> Tested-by: syzbot@syzkaller.appspotmail.com
> Cc: stable@vger.kernel.org
> Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Looks good to me.
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
--
Thanks,
Hyunchul
prev parent reply other threads:[~2026-12-03 1:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 7:24 [PATCH] ntfs: map a read past the end of the runlist as a hole Zhan Xusheng
2026-12-02 10:38 ` liubaolin
2026-12-02 11:17 ` liubaolin
2026-12-02 11:28 ` liubaolin
2026-12-03 1:18 ` Hyunchul Lee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axDDfVgUEmSoO1Te@hyunchul-PC02 \
--to=hyc.lee@gmail.com \
--cc=ernest.borowski.git@proton.me \
--cc=linkinjeon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liubaolin12138@163.com \
--cc=ntfs@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=syzbot@syzkaller.appspotmail.com \
--cc=zhanxusheng1024@gmail.com \
--cc=zhanxusheng@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox