From: Zenghui Yu <zenghui.yu@linux.dev>
To: Breno Leitao <leitao@debian.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Shuah Khan <shuah@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
catalin.marinas@arm.com, linux-kselftest@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH] init: do_mounts: free the ramfs info of the boot rootfs
Date: Thu, 29 Oct 2026 17:28:24 +0800 [thread overview]
Message-ID: <0bc9b82b-0b38-4df3-8227-f21d6b6e959f@linux.dev> (raw)
In-Reply-To: <auBzcXQw0j4zTvTM@gmail.com>
On 10/27/26 5:48 PM, Breno Leitao wrote:
> On Fri, Oct 16, 2026 at 07:27:58AM -0700, Breno Leitao wrote:
> > Kmemleak is reporting the following leak in ramfs_init_fs_context:
> >
> > unreferenced object 0xffff000080302480 (size 8):
> > comm "swapper/0", pid 0, jiffies 4294667306
> > hex dump (first 8 bytes):
> > ed 01 00 00 00 00 00 00 ........
> > backtrace (crc bea23b04):
> > __kmalloc_cache_noprof+0x28c/0x5a0
> > ramfs_init_fs_context+0x5c/0xf8
> > rootfs_init_fs_context+0x30/0x40
> > alloc_fs_context+0x4c0/0x6a8
> > fs_context_for_mount+0x28/0x40
> > vfs_kern_mount+0x40/0x220
> > init_mount_tree+0x80/0x440
> > mnt_init+0x138/0x170
> > vfs_caches_init+0x2c/0x48
> > start_kernel+0x350/0x3f8
> >
> > When init pivot_root()s away from a ramfs-backed boot rootfs and
> > unmounts it, the rootfs superblock is killed with kill_anon_super() and
> > the struct ramfs_fs_info allocated by ramfs_init_fs_context() is never
> > freed.
> >
> > Kill a ramfs-backed rootfs with ramfs_kill_sb(). A tmpfs-backed one keeps
> > kill_anon_super(), as shmem frees its info in ->put_super.
> >
> > Fixes: 576ee5dfd459 ("fs: add immutable rootfs")
> > Signed-off-by: Breno Leitao <leitao@debian.org>
>
> Ping?
There is a similar fix for that.
https://lore.kernel.org/20261009055546.85279-1-kmehltretter@gmail.com
prev parent reply other threads:[~2026-10-29 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 14:27 Breno Leitao
2026-10-27 9:48 ` Breno Leitao
2026-10-29 9:28 ` Zenghui Yu [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=0bc9b82b-0b38-4df3-8227-f21d6b6e959f@linux.dev \
--to=zenghui.yu@linux.dev \
--cc=brauner@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=jack@suse.cz \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®