aboutsummaryrefslogtreecommitdiffstats
path: root/security/bpf/hooks.c
diff options
context:
space:
mode:
authorPaul Moore <[email protected]>2023-11-10 17:09:33 +0000
committerPaul Moore <[email protected]>2023-11-13 03:54:42 +0000
commitb1a867eeb8ab5e097178728b01cc504c6806acca (patch)
tree69e062069760bb4e30fcba6b3238281f64914b08 /security/bpf/hooks.c
parentlsm: convert security_setselfattr() to use memdup_user() (diff)
downloadkernel-b1a867eeb8ab5e097178728b01cc504c6806acca.tar.gz
kernel-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 <[email protected]> Suggested-by: Casey Schaufler <[email protected]> Reviewed-by: Casey Schaufler <[email protected]> Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'security/bpf/hooks.c')
-rw-r--r--security/bpf/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/bpf/hooks.c b/security/bpf/hooks.c
index 91011e0c361a..57b9ffd53c98 100644
--- a/security/bpf/hooks.c
+++ b/security/bpf/hooks.c
@@ -16,7 +16,7 @@ static struct security_hook_list bpf_lsm_hooks[] __ro_after_init = {
LSM_HOOK_INIT(task_free, bpf_task_storage_free),
};
-const struct lsm_id bpf_lsmid = {
+static const struct lsm_id bpf_lsmid = {
.name = "bpf",
.id = LSM_ID_BPF,
};