X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=security%2Ftomoyo%2Frealpath.c;h=62363b3bc7161b03b725c90d5a1523619c943599;hb=fdb8ebb729bbb640e64028a4f579a02ebc405727;hp=e3c7aa0fb706ea2ec5beffbd4a31f203915c492e;hpb=86fc80f16e8a2449d5827bf1a9838b7fd9f70097;p=net-next-2.6.git diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index e3c7aa0fb70..62363b3bc71 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c @@ -402,11 +402,13 @@ void __init tomoyo_realpath_init(void) INIT_LIST_HEAD(&tomoyo_name_list[i]); INIT_LIST_HEAD(&tomoyo_kernel_domain.acl_info_list); tomoyo_kernel_domain.domainname = tomoyo_save_name(TOMOYO_ROOT_NAME); - list_add_tail(&tomoyo_kernel_domain.list, &tomoyo_domain_list); - down_read(&tomoyo_domain_list_lock); + /* + * tomoyo_read_lock() is not needed because this function is + * called before the first "delete" request. + */ + list_add_tail_rcu(&tomoyo_kernel_domain.list, &tomoyo_domain_list); if (tomoyo_find_domain(TOMOYO_ROOT_NAME) != &tomoyo_kernel_domain) panic("Can't register tomoyo_kernel_domain"); - up_read(&tomoyo_domain_list_lock); } /* Memory allocated for temporary purpose. */