diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2009-02-21 06:40:50 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-22 17:45:05 -0500 |
commit | 1581e7ddbdd97443a134e1a0cc9d81256baf77a4 (patch) | |
tree | 54134783d9b61dea08b434e0d6e447ac8f8924b2 /security/tomoyo/tomoyo.c | |
parent | 0da0a420bb542b13ebae142109a9d2045ade0cb1 (diff) |
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 <takedakn@nttdata.co.jp>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Toshiharu Harada <haradats@nttdata.co.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/tomoyo.c')
-rw-r--r-- | security/tomoyo/tomoyo.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
287 | panic("Failure registering TOMOYO Linux"); | 287 | panic("Failure registering TOMOYO Linux"); |
288 | printk(KERN_INFO "TOMOYO Linux initialized\n"); | 288 | printk(KERN_INFO "TOMOYO Linux initialized\n"); |
289 | cred->security = &tomoyo_kernel_domain; | 289 | cred->security = &tomoyo_kernel_domain; |
290 | tomoyo_realpath_init(); | ||
290 | return 0; | 291 | return 0; |
291 | } | 292 | } |
292 | 293 | ||