summaryrefslogtreecommitdiff
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-02-05 05:25:18 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2025-09-16 04:08:33 +0300
commitf9fadf23c7f1a0df72ef50a873e1bd3bd4631ec1 (patch)
treede386ee19f0ec05dbfd357c96e200c33150d0838 /security/selinux/hooks.c
parentb320789d6883cc00ac78ce83bccbfe7ed58afcf0 (diff)
downloadlinux-f9fadf23c7f1a0df72ef50a873e1bd3bd4631ec1.tar.xz
security_dentry_init_security(): constify qstr argument
Nothing outside of fs/dcache.c has any business modifying dentry names; passing &dentry->d_name as an argument should have that argument declared as a const pointer. Acked-by: Casey Schaufler <casey@schaufler-ca.com> # smack part Acked-by: Paul Moore <paul@paul-moore.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index c95a5874bf7d..58ce49954206 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2901,7 +2901,7 @@ static int selinux_dentry_init_security(struct dentry *dentry, int mode,
}
static int selinux_dentry_create_files_as(struct dentry *dentry, int mode,
- struct qstr *name,
+ const struct qstr *name,
const struct cred *old,
struct cred *new)
{