[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190611134815.16612-1-yuehaibing@huawei.com>
Date: Tue, 11 Jun 2019 21:48:15 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <serge@...lyn.com>, <jmorris@...ei.org>
CC: <linux-kernel@...r.kernel.org>,
<linux-security-module@...r.kernel.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] security: Make capability_hooks static
Fix sparse warning:
security/commoncap.c:1347:27: warning:
symbol 'capability_hooks' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
security/commoncap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/commoncap.c b/security/commoncap.c
index c0b9664..3150bed 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -1339,7 +1339,7 @@ int cap_mmap_file(struct file *file, unsigned long reqprot,
#ifdef CONFIG_SECURITY
-struct security_hook_list capability_hooks[] __lsm_ro_after_init = {
+static struct security_hook_list capability_hooks[] __lsm_ro_after_init = {
LSM_HOOK_INIT(capable, cap_capable),
LSM_HOOK_INIT(settime, cap_settime),
LSM_HOOK_INIT(ptrace_access_check, cap_ptrace_access_check),
--
2.7.4
Powered by blists - more mailing lists