aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/tomoyo/realpath.c7
-rw-r--r--security/tomoyo/realpath.h3
-rw-r--r--security/tomoyo/tomoyo.c1
3 files changed, 5 insertions, 6 deletions
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index 5fd48d23a217..d47f16b844b2 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -371,10 +371,8 @@ const struct tomoyo_path_info *tomoyo_save_name(const char *name)
371 371
372/** 372/**
373 * tomoyo_realpath_init - Initialize realpath related code. 373 * tomoyo_realpath_init - Initialize realpath related code.
374 *
375 * Returns 0.
376 */ 374 */
377static int __init tomoyo_realpath_init(void) 375void __init tomoyo_realpath_init(void)
378{ 376{
379 int i; 377 int i;
380 378
@@ -388,11 +386,8 @@ static int __init tomoyo_realpath_init(void)
388 if (tomoyo_find_domain(TOMOYO_ROOT_NAME) != &tomoyo_kernel_domain) 386 if (tomoyo_find_domain(TOMOYO_ROOT_NAME) != &tomoyo_kernel_domain)
389 panic("Can't register tomoyo_kernel_domain"); 387 panic("Can't register tomoyo_kernel_domain");
390 up_read(&tomoyo_domain_list_lock); 388 up_read(&tomoyo_domain_list_lock);
391 return 0;
392} 389}
393 390
394security_initcall(tomoyo_realpath_init);
395
396/* Memory allocated for temporary purpose. */ 391/* Memory allocated for temporary purpose. */
397static atomic_t tomoyo_dynamic_memory_size; 392static atomic_t tomoyo_dynamic_memory_size;
398 393
diff --git a/security/tomoyo/realpath.h b/security/tomoyo/realpath.h
index 0ea541fcb53c..7ec9fc9cbc07 100644
--- a/security/tomoyo/realpath.h
+++ b/security/tomoyo/realpath.h
@@ -60,4 +60,7 @@ int tomoyo_read_memory_counter(struct tomoyo_io_buffer *head);
60/* Set memory quota. */ 60/* Set memory quota. */
61int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head); 61int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head);
62 62
63/* Initialize realpath related code. */
64void __init tomoyo_realpath_init(void);
65
63#endif /* !defined(_SECURITY_TOMOYO_REALPATH_H) */ 66#endif /* !defined(_SECURITY_TOMOYO_REALPATH_H) */
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