From: Lai Jiangshan Date: Fri, 15 Mar 2013 16:50:53 +0000 (+0800) Subject: tomoyo: use DEFINE_SRCU() to define tomoyo_ss X-Git-Tag: upstream/snapshot3+hdmi~5243^2~4^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=921f3ac4c3f2fd46ae99195a1168383ca9b41ed1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Tetsuo Handa Signed-off-by: James Morris --- diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index a2ee362..f0b756e 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;