* [PATCH -next] security: Make capability_hooks static
@ 2019-06-11 13:48 YueHaibing
2019-06-11 21:44 ` James Morris
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-06-11 13:48 UTC (permalink / raw)
To: serge, jmorris; +Cc: linux-kernel, linux-security-module, YueHaibing
Fix sparse warning:
security/commoncap.c:1347:27: warning:
symbol 'capability_hooks' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] security: Make capability_hooks static
2019-06-11 13:48 [PATCH -next] security: Make capability_hooks static YueHaibing
@ 2019-06-11 21:44 ` James Morris
0 siblings, 0 replies; 2+ messages in thread
From: James Morris @ 2019-06-11 21:44 UTC (permalink / raw)
To: YueHaibing; +Cc: serge, linux-kernel, linux-security-module
On Tue, 11 Jun 2019, YueHaibing wrote:
> Fix sparse warning:
>
> security/commoncap.c:1347:27: warning:
> symbol 'capability_hooks' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> security/commoncap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-lsm
--
James Morris
<jmorris@namei.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-11 21:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 13:48 [PATCH -next] security: Make capability_hooks static YueHaibing
2019-06-11 21:44 ` James Morris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).