From: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
To: Christian Brauner <brauner@kernel.org>
Cc: syzbot+ad45f827c88778ff7df6@syzkaller.appspotmail.com,
frank.li@vivo.com, glaubitz@physik.fu-berlin.de,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
slava@dubeyko.com, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] fs/super: fix memory leak of s_fs_info on setup_bdev_super failure
Date: Fri, 14 Nov 2025 17:05:19 +0100 [thread overview]
Message-ID: <1b598791-6d03-48a0-85be-da7d3242ed74@gmail.com> (raw)
In-Reply-To: <20251114-raubt-benoten-bf2d8f2317b2@brauner>
On 11/14/25 12:55 PM, Christian Brauner wrote:
> On Fri, Nov 14, 2025 at 06:12:12AM +0100, Mehdi Ben Hadj Khelifa wrote:
>> #syz test
>>
>> diff --git a/fs/super.c b/fs/super.c
>> index 5bab94fb7e03..a99e5281b057 100644
>> --- a/fs/super.c
>> +++ b/fs/super.c
>> @@ -1690,6 +1690,11 @@ int get_tree_bdev_flags(struct fs_context *fc,
>> if (!error)
>> error = fill_super(s, fc);
>> if (error) {
>> + /*
>> + * return back sb_info ownership to fc to be freed by put_fs_context()
>> + */
>> + fc->s_fs_info = s->s_fs_info;
>> + s->s_fs_info = NULL;
>> deactivate_locked_super(s);
>> return error;
>> }
>> --
>> 2.51.2
>>
>
> No, either free it in hfs_fill_super() when it fails or add a wrapper
> around kill_block_super() for hfs and free it after ->kill_sb() has run.
Ah. I just saw your reply after my I just sent out a new similar test.
I will be working on it with your suggestion.
Best Regards,
Mehdi Ben Hadj Khelifa
next prev parent reply other threads:[~2025-11-14 15:05 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 4:27 [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-13 21:47 ` Viacheslav Dubeyko
2025-11-14 1:24 ` Mehdi Ben Hadj Khelifa
2025-11-14 2:03 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-14 3:18 ` Mehdi Ben Hadj Khelifa
2025-11-14 3:00 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-14 5:12 ` [PATCH] fs/super: fix memory leak of s_fs_info on setup_bdev_super failure Mehdi Ben Hadj Khelifa
2025-11-14 4:26 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-14 11:55 ` [PATCH] fs/super: fix memory leak of s_fs_info on setup_bdev_super failure Christian Brauner
2025-11-14 16:05 ` Mehdi Ben Hadj Khelifa [this message]
2025-11-14 17:15 ` Mehdi Ben Hadj Khelifa
2025-11-19 13:43 ` Christian Brauner
2025-11-19 14:13 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-19 14:16 ` Christian Brauner
2025-11-19 15:08 ` syzbot
2025-11-14 16:01 ` Mehdi Ben Hadj Khelifa
2025-11-14 15:29 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-18 17:00 ` Mehdi Ben Hadj Khelifa
2025-11-18 17:15 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-18 18:27 ` Mehdi Ben Hadj Khelifa
2025-11-18 17:40 ` Al Viro
2025-11-18 20:32 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-18 19:21 ` Mehdi Ben Hadj Khelifa
2025-11-18 20:32 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
2025-11-19 5:31 ` Mehdi Ben Hadj Khelifa
2025-11-19 5:19 ` [syzbot] [hfs?] memory leak in hfs_init_fs_context syzbot
-- strict thread matches above, loose matches on Subject: below --
2025-11-14 16:52 [PATCH] fs/super: fix memory leak of s_fs_info on setup_bdev_super failure Mehdi Ben Hadj Khelifa
2025-11-18 14:59 ` Al Viro
2025-11-18 16:21 ` Mehdi Ben Hadj Khelifa
2025-11-18 16:35 ` Al Viro
2025-11-18 16:55 ` Al Viro
2025-11-18 18:05 ` Mehdi Ben Hadj Khelifa
2025-11-18 17:58 ` Mehdi Ben Hadj Khelifa
2025-11-26 14:01 ` kernel test robot
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=1b598791-6d03-48a0-85be-da7d3242ed74@gmail.com \
--to=mehdi.benhadjkhelifa@gmail.com \
--cc=brauner@kernel.org \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=syzbot+ad45f827c88778ff7df6@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.