aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/domain.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-01-26 06:45:27 -0500
committerJames Morris <jmorris@namei.org>2010-01-26 16:20:48 -0500
commit8e2d39a1665e680c095545993aac2fcac6916eb9 (patch)
tree41687f7e7f4fb37416b7948b6d2e09d0a383459b /security/tomoyo/domain.c
parent7d52a155e38d5a165759dbbee656455861bf7801 (diff)
TOMOYO: Remove usage counter for temporary memory.
TOMOYO was using own memory usage counter for detecting memory leak. But as kernel 2.6.31 introduced memory leak detection mechanism ( CONFIG_DEBUG_KMEMLEAK ), we no longer need to have own counter. We remove usage counter for memory used for permission checks, but we keep usage counter for memory used for policy so that we can apply quota. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/domain.c')
-rw-r--r--security/tomoyo/domain.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c
index a55a1cced58e..34843971cc60 100644
--- a/security/tomoyo/domain.c
+++ b/security/tomoyo/domain.c
@@ -787,7 +787,7 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
787 * This function assumes that the size of buffer returned by 787 * This function assumes that the size of buffer returned by
788 * tomoyo_realpath() = TOMOYO_MAX_PATHNAME_LEN. 788 * tomoyo_realpath() = TOMOYO_MAX_PATHNAME_LEN.
789 */ 789 */
790 struct tomoyo_page_buffer *tmp = tomoyo_alloc(sizeof(*tmp)); 790 struct tomoyo_page_buffer *tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
791 struct tomoyo_domain_info *old_domain = tomoyo_domain(); 791 struct tomoyo_domain_info *old_domain = tomoyo_domain();
792 struct tomoyo_domain_info *domain = NULL; 792 struct tomoyo_domain_info *domain = NULL;
793 const char *old_domain_name = old_domain->domainname->name; 793 const char *old_domain_name = old_domain->domainname->name;
@@ -902,8 +902,8 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
902 if (!domain) 902 if (!domain)
903 domain = old_domain; 903 domain = old_domain;
904 bprm->cred->security = domain; 904 bprm->cred->security = domain;
905 tomoyo_free(real_program_name); 905 kfree(real_program_name);
906 tomoyo_free(symlink_program_name); 906 kfree(symlink_program_name);
907 tomoyo_free(tmp); 907 kfree(tmp);
908 return retval; 908 return retval;
909} 909}