[PATCH 1/8] securityfs: don't pin dentries twice, once is enough...

Paul Moore paul at paul-moore.com
Tue May 13 23:13:07 UTC 2025


On Fri, May 9, 2025 at 12:38 AM Al Viro <viro at zeniv.linux.org.uk> wrote:
>
> From 5c463d47c814e16adb6e997a05ca5625df41152d Mon Sep 17 00:00:00 2001
> From: Al Viro <viro at zeniv.linux.org.uk>
> Date: Thu, 8 May 2025 23:38:01 -0400
> Subject: [PATCH 1/8] securityfs: don't pin dentries twice, once is enough...
>
> incidentally, securityfs_recursive_remove() is broken without that -
> it leaks dentries, since simple_recursive_removal() does not expect
> anything of that sort.  It could be worked around by dput() in
> remove_one() callback, but it's easier to just drop that double-get
> stuff.
>
> Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
> ---
>  security/inode.c | 2 --
>  1 file changed, 2 deletions(-)

Replying with a lore link to the associated discussion and warning so
we have some record of it in the LSM patchwork.

https://lore.kernel.org/linux-security-module/20250509044613.GT2023217@ZenIV/

-- 
paul-moore.com



More information about the Linux-security-module-archive mailing list