From 1581e7ddbdd97443a134e1a0cc9d81256baf77a4 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Sat, 21 Feb 2009 20:40:50 +0900 Subject: TOMOYO: Do not call tomoyo_realpath_init unless registered. tomoyo_realpath_init() is unconditionally called by security_initcall(). But nobody will use realpath related functions if TOMOYO is not registered. So, let tomoyo_init() call tomoyo_realpath_init(). This patch saves 4KB of memory allocation if TOMOYO is not registered. Signed-off-by: Kentaro Takeda Signed-off-by: Tetsuo Handa Signed-off-by: Toshiharu Harada Signed-off-by: James Morris --- security/tomoyo/tomoyo.c | 1 + 1 file changed, 1 insertion(+) (limited to 'security/tomoyo/tomoyo.c') diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index cc599b36a3a8..3eeeae12c4dc 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@ -287,6 +287,7 @@ static int __init tomoyo_init(void) panic("Failure registering TOMOYO Linux"); printk(KERN_INFO "TOMOYO Linux initialized\n"); cred->security = &tomoyo_kernel_domain; + tomoyo_realpath_init(); return 0; } -- cgit v1.2.3