]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selinuxfs: don't stash the dentry of /policy_capabilities
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 21 Sep 2025 22:09:48 +0000 (18:09 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 16 Nov 2025 06:35:05 +0000 (01:35 -0500)
commitd297622875f9bedd8c1105e1797040e0b8d19402
tree20c1cf28a6aefd528add583b4e11704ecb9095df
parent7beafd51c4e11138e9ff848e3e6583cda748d50b
selinuxfs: don't stash the dentry of /policy_capabilities

Don't bother to store the dentry of /policy_capabilities - it belongs
to invariant part of tree and we only use it to populate that directory,
so there's no reason to keep it around afterwards.

Same situation as with /avc, /ss, etc.  There are two directories that
get replaced on policy load - /class and /booleans.  These we need to
stash (and update the pointers on policy reload); /policy_capabilities
is not in the same boat.

Acked-by: Paul Moore <paul@paul-moore.com>
Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Tested-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
security/selinux/selinuxfs.c