aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/realpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/realpath.c')
-rw-r--r--security/tomoyo/realpath.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index e3c7aa0fb706..62363b3bc716 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -402,11 +402,13 @@ void __init tomoyo_realpath_init(void)
402 INIT_LIST_HEAD(&tomoyo_name_list[i]); 402 INIT_LIST_HEAD(&tomoyo_name_list[i]);
403 INIT_LIST_HEAD(&tomoyo_kernel_domain.acl_info_list); 403 INIT_LIST_HEAD(&tomoyo_kernel_domain.acl_info_list);
404 tomoyo_kernel_domain.domainname = tomoyo_save_name(TOMOYO_ROOT_NAME); 404 tomoyo_kernel_domain.domainname = tomoyo_save_name(TOMOYO_ROOT_NAME);
405 list_add_tail(&tomoyo_kernel_domain.list, &tomoyo_domain_list); 405 /*
406 down_read(&tomoyo_domain_list_lock); 406 * tomoyo_read_lock() is not needed because this function is
407 * called before the first "delete" request.
408 */
409 list_add_tail_rcu(&tomoyo_kernel_domain.list, &tomoyo_domain_list);
407 if (tomoyo_find_domain(TOMOYO_ROOT_NAME) != &tomoyo_kernel_domain) 410 if (tomoyo_find_domain(TOMOYO_ROOT_NAME) != &tomoyo_kernel_domain)
408 panic("Can't register tomoyo_kernel_domain"); 411 panic("Can't register tomoyo_kernel_domain");
409 up_read(&tomoyo_domain_list_lock);
410} 412}
411 413
412/* Memory allocated for temporary purpose. */ 414/* Memory allocated for temporary purpose. */