diff options
author | Paul Moore <paul@paul-moore.com> | 2023-11-10 18:09:33 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-11-13 04:54:42 +0100 |
commit | b1a867eeb8ab5e097178728b01cc504c6806acca (patch) | |
tree | 69e062069760bb4e30fcba6b3238281f64914b08 /security/selinux/hooks.c | |
parent | lsm: convert security_setselfattr() to use memdup_user() (diff) | |
download | linux-b1a867eeb8ab5e097178728b01cc504c6806acca.tar.xz linux-b1a867eeb8ab5e097178728b01cc504c6806acca.zip |
lsm: mark the lsm_id variables are marked as static
As the kernel test robot helpfully reminded us, all of the lsm_id
instances defined inside the various LSMs should be marked as static.
The one exception is Landlock which uses its lsm_id variable across
multiple source files with an extern declaration in a header file.
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 942f2b8c4ebb..b340425ccfae 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -7031,7 +7031,7 @@ static int selinux_uring_cmd(struct io_uring_cmd *ioucmd) } #endif /* CONFIG_IO_URING */ -const struct lsm_id selinux_lsmid = { +static const struct lsm_id selinux_lsmid = { .name = "selinux", .id = LSM_ID_SELINUX, }; |