summaryrefslogtreecommitdiff
path: root/security/tomoyo/domain.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-02-11 00:43:20 (GMT)
committerJames Morris <jmorris@namei.org>2010-02-14 22:00:21 (GMT)
commitec8e6a4e062e2edebef91e930c20572c9f4c0dda (patch)
tree1c48fb2aa2220b3bdc138e0fb33e1ac632d0dffe /security/tomoyo/domain.c
parent76bb0895d038be7bcdb6ccfcd2dd7deb30371d6b (diff)
downloadlinux-fsl-qoriq-ec8e6a4e062e2edebef91e930c20572c9f4c0dda.tar.xz
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 <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/domain.c')
-rw-r--r--security/tomoyo/domain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c
index d60b8a6..6f74b30 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);