diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2009-12-07 19:34:43 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-12-14 23:46:31 -0500 |
commit | fdb8ebb729bbb640e64028a4f579a02ebc405727 (patch) | |
tree | 9dfca7422cb858cd05208734affab31d980030fe /security/tomoyo/realpath.c | |
parent | 86fc80f16e8a2449d5827bf1a9838b7fd9f70097 (diff) |
TOMOYO: Use RCU primitives for list operation
Replace list operation with RCU primitives and replace
down_read()/up_read() with srcu_read_lock()/srcu_read_unlock().
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/realpath.c')
-rw-r--r-- | security/tomoyo/realpath.c | 8 |
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. */ |