Re: [PATCH] binfmt_misc: don't leak the user namespace when the mount fails

[email protected]
Newsgroups org.kvack.linux-mm,org.kernel.vger.bpf,org.kernel.vger.linux-fsdevel,org.kernel.vger.stable
Message-ID <178631506414.3049071.14867849911905814452.git-patchwork-notify@kernel.org>
Hello:

This patch was applied to bpf/bpf.git (master)
by Christian Brauner <[email protected]>:

On Tue, 28 Jul 2026 15:48:10 +0200 you wrote:
> bm_get_tree() takes a reference to the user namespace and hands it to
> get_tree_keyed() as the sget key. sget_fc() moves that reference into
> sb->s_fs_info and clears fc->s_fs_info, so from that point on the
> superblock owns it and bm_free() doesn't see it anymore.
> 
> The superblock drops it in ->put_super(). But generic_shutdown_super()
> only calls ->put_super() from inside the if (sb->s_root) branch, so
> nothing releases it when bm_fill_super() fails:
> 
> [...]

Here is the summary with links:
  - binfmt_misc: don't leak the user namespace when the mount fails
    https://git.kernel.org/bpf/bpf/c/b8206f516fe7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.