From: liubaolin <liubaolin12138@163.com>
To: Matthias Goergens <matthias.goergens@gmail.com>,
Namjae Jeon <linkinjeon@kernel.org>,
Hyunchul Lee <hyc.lee@gmail.com>
Cc: ntfs@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] ntfs: fix the undo path of $MFT data extension
Date: Sun, 27 Sep 2026 21:07:01 +0800 [thread overview]
Message-ID: <46ec6087-6509-4ba2-a98b-807dfec5f5c0@163.com> (raw)
In-Reply-To: <20260927105706.3111333-1-matthias.goergens@gmail.com>
在 2026/9/27 18:57, Matthias Goergens 写道:
> These fix two bugs in the undo path of
> ntfs_mft_data_extend_allocation_nolock(). Patch 1 makes the $MFT
> runlist locking there consistent: a map_mft_record() failure leaks the
> lock, a lookup failure in restore_undo_alloc releases it without holding
> it, and the clusters are freed and the runlist truncated without it.
> Patch 2 fixes a use-after-free of a pointer into the runlist across the
> truncation.
>
> Both paths only run when something fails while $MFT grows, so I tested
> them in QEMU by forcing each failure once with a debug patch. The
> debug patch, the test scripts and the images are at
> https://github.com/matthiasgoergens/linux/tree/reproducer/2026-09-27-ntfs-mft-extend-undo
>
> Thanks,
> Matthias
>
> Matthias Goergens (2):
> ntfs: balance the $MFT runlist lock in data extension error paths
> ntfs: do not use a stale runlist pointer when undoing $MFT extension
>
> fs/ntfs/mft.c | 63 +++++++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 53 insertions(+), 10 deletions(-)
>
>
> base-commit: 259abb551e2944998cad4214c201954ab1ac5c8d
The series looks good to me.
Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>
prev parent reply other threads:[~2026-09-27 13:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 10:57 Matthias Goergens
2026-09-27 10:57 ` [PATCH 1/2] ntfs: balance the $MFT runlist lock in data extension error paths Matthias Goergens
2026-09-27 13:03 ` liubaolin
2026-09-28 5:01 ` Hyunchul Lee
2026-09-27 10:57 ` [PATCH 2/2] ntfs: do not use a stale runlist pointer when undoing $MFT extension Matthias Goergens
2026-09-27 13:04 ` liubaolin
2026-09-27 13:07 ` liubaolin [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=46ec6087-6509-4ba2-a98b-807dfec5f5c0@163.com \
--to=liubaolin12138@163.com \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.goergens@gmail.com \
--cc=ntfs@lists.linux.dev \
/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
all inboxes | Powered by JetHome®