From ec8e6a4e062e2edebef91e930c20572c9f4c0dda Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Thu, 11 Feb 2010 09:43:20 +0900 Subject: TOMOYO: Add refcounter on domain structure. Add refcounter to "struct tomoyo_domain_info" since garbage collector needs to determine whether this struct is referred by "struct cred"->security or not. Signed-off-by: Tetsuo Handa Acked-by: Serge Hallyn Signed-off-by: James Morris --- security/tomoyo/domain.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'security/tomoyo/domain.c') diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index d60b8a61b0c8..6f74b30d6bb1 100644 --- a/security/tomoyo/domain.c +++ b/security/tomoyo/domain.c @@ -817,6 +817,8 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm) out: if (!domain) domain = old_domain; + /* Update reference count on "struct tomoyo_domain_info". */ + atomic_inc(&domain->users); bprm->cred->security = domain; kfree(real_program_name); kfree(symlink_program_name); -- cgit v1.2.2