From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: <ntfs3@lists.linux.dev>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] fs/ntfs3: fix memory leak in ntfs_fill_super()
Date: Thu, 11 Dec 2025 15:33:33 +0100 [thread overview]
Message-ID: <502bfbc8-9bbe-47f7-b4a3-723f51a61700@paragon-software.com> (raw)
In-Reply-To: <20251211135126.13965-1-almaz.alexandrovich@paragon-software.com>
On 12/11/25 14:51, Konstantin Komarov wrote:
> ntfs_fill_super() assigns fc->fs_private to a newly allocated options
> structure earlier in the mount path. At the end of a successful mount, the
> code set fc->fs_private = NULL, which prevented the vfs from freeing this
> memory during mount context cleanup. As a result, the options structure
> was leaked.
>
> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> ---
> fs/ntfs3/super.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
> index a641d474c782..38d82e46171a 100644
> --- a/fs/ntfs3/super.c
> +++ b/fs/ntfs3/super.c
> @@ -1252,7 +1252,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
> }
> }
> sbi->options = options;
> - fc->fs_private = NULL;
> sb->s_flags |= SB_NODIRATIME;
> sb->s_magic = 0x7366746e; // "ntfs"
> sb->s_op = &ntfs_sops;
Please withdraw this patch.
I realized after sending it that an equivalent patch was already submitted
earlier by Baokun Li<libaokun1@huawei.com>. My version is redundant, so I
will drop it and proceed with reviewing/merging the earlier contribution.
Apologies for the duplication.
Regards,
Konstantin
next prev parent reply other threads:[~2025-12-11 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 13:51 Konstantin Komarov
2025-12-11 14:33 ` Konstantin Komarov [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-16 17:58 [PATCH] fs/ntfs3: Fix " Shigeru Yoshida
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=502bfbc8-9bbe-47f7-b4a3-723f51a61700@paragon-software.com \
--to=almaz.alexandrovich@paragon-software.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@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®