[PATCH RESEND v2 35/51] proc: warn about entries left in /proc/net of a dying namespace
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Nov 5 11:29:58 PST 2026
> proc_net_ns_exit() runs after all the other pernet exits and frees
> net->proc_net right after removing "stat" from it. An entry that some
> pernet exit forgot to remove is left with a freed ->parent, and so
> PDE_NET() hands seq_open_net() and single_open_net() a freed struct net
> when the entry is opened through a file descriptor that someone kept.
>
> There is no such entry in the tree that we know of, but nothing would
> tell us about one either. So warn about it like remove_proc_entry()
> does for a directory that isn't empty.
>
> Reported-by: Chris Mason <mason at kernel.org>
> Fixes: e9720acd728a ("[NET]: Make /proc/net a symlink on /proc/self/net (v3)")
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-work-procfs-bugfixes-v2-0-021c84d852e0@kernel.org?part=35
More information about the kexec
mailing list