diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-02-10 19:43:20 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-02-14 17:00:21 -0500 |
commit | ec8e6a4e062e2edebef91e930c20572c9f4c0dda (patch) | |
tree | 1c48fb2aa2220b3bdc138e0fb33e1ac632d0dffe /security/tomoyo/common.h | |
parent | 76bb0895d038be7bcdb6ccfcd2dd7deb30371d6b (diff) |
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/common.h')
-rw-r--r-- | security/tomoyo/common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index f6aff59b0885..521b4b5addaf 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -234,6 +234,10 @@ struct tomoyo_acl_info { | |||
234 | * name of the domain to be created was too long or it could not allocate | 234 | * name of the domain to be created was too long or it could not allocate |
235 | * memory. If set to true, more than one process continued execve() | 235 | * memory. If set to true, more than one process continued execve() |
236 | * without domain transition. | 236 | * without domain transition. |
237 | * (9) "users" is an atomic_t that holds how many "struct cred"->security | ||
238 | * are referring this "struct tomoyo_domain_info". If is_deleted == true | ||
239 | * and users == 0, this struct will be kfree()d upon next garbage | ||
240 | * collection. | ||
237 | * | 241 | * |
238 | * A domain's lifecycle is an analogy of files on / directory. | 242 | * A domain's lifecycle is an analogy of files on / directory. |
239 | * Multiple domains with the same domainname cannot be created (as with | 243 | * Multiple domains with the same domainname cannot be created (as with |
@@ -252,6 +256,7 @@ struct tomoyo_domain_info { | |||
252 | bool quota_warned; /* Quota warnning flag. */ | 256 | bool quota_warned; /* Quota warnning flag. */ |
253 | bool ignore_global_allow_read; /* Ignore "allow_read" flag. */ | 257 | bool ignore_global_allow_read; /* Ignore "allow_read" flag. */ |
254 | bool transition_failed; /* Domain transition failed flag. */ | 258 | bool transition_failed; /* Domain transition failed flag. */ |
259 | atomic_t users; /* Number of referring credentials. */ | ||
255 | }; | 260 | }; |
256 | 261 | ||
257 | /* | 262 | /* |