summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2013-03-16 00:50:53 +0800
committerJames Morris <james.l.morris@oracle.com>2013-03-18 23:51:31 +1100
commit921f3ac4c3f2fd46ae99195a1168383ca9b41ed1 (patch)
tree02dae93a4c8c0b98b55c23638e054118f37f6c4b /security
parent2c4cdf5950b1a7a9d731c03c56e2cea3bd8ca7b7 (diff)
downloadlinux-stable-921f3ac4c3f2fd46ae99195a1168383ca9b41ed1.tar.gz
linux-stable-921f3ac4c3f2fd46ae99195a1168383ca9b41ed1.tar.bz2
linux-stable-921f3ac4c3f2fd46ae99195a1168383ca9b41ed1.zip
tomoyo: use DEFINE_SRCU() to define tomoyo_ss
DEFINE_STATIC_SRCU() defines srcu struct and do init at build time. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security')
-rw-r--r--security/tomoyo/tomoyo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index a2ee362546ab..f0b756e27fed 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -536,7 +536,7 @@ static struct security_operations tomoyo_security_ops = {
};
/* Lock for GC. */
-struct srcu_struct tomoyo_ss;
+DEFINE_SRCU(tomoyo_ss);
/**
* tomoyo_init - Register TOMOYO Linux as a LSM module.
@@ -550,8 +550,7 @@ static int __init tomoyo_init(void)
if (!security_module_enable(&tomoyo_security_ops))
return 0;
/* register ourselves with the security framework */
- if (register_security(&tomoyo_security_ops) ||
- init_srcu_struct(&tomoyo_ss))
+ if (register_security(&tomoyo_security_ops))
panic("Failure registering TOMOYO Linux");
printk(KERN_INFO "TOMOYO Linux initialized\n");
cred->security = &tomoyo_kernel_domain;