diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-01-26 11:45:27 (GMT) |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-01-26 21:20:48 (GMT) |
commit | 8e2d39a1665e680c095545993aac2fcac6916eb9 (patch) | |
tree | 41687f7e7f4fb37416b7948b6d2e09d0a383459b /security/tomoyo/domain.c | |
parent | 7d52a155e38d5a165759dbbee656455861bf7801 (diff) | |
download | linux-fsl-qoriq-8e2d39a1665e680c095545993aac2fcac6916eb9.tar.xz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index a55a1cc..3484397 100644 --- a/security/tomoyo/domain.c +++ b/security/tomoyo/domain.c @@ -787,7 +787,7 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm) * This function assumes that the size of buffer returned by * tomoyo_realpath() = TOMOYO_MAX_PATHNAME_LEN. */ - struct tomoyo_page_buffer *tmp = tomoyo_alloc(sizeof(*tmp)); + struct tomoyo_page_buffer *tmp = kzalloc(sizeof(*tmp), GFP_KERNEL); struct tomoyo_domain_info *old_domain = tomoyo_domain(); struct tomoyo_domain_info *domain = NULL; const char *old_domain_name = old_domain->domainname->name; @@ -902,8 +902,8 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm) if (!domain) domain = old_domain; bprm->cred->security = domain; - tomoyo_free(real_program_name); - tomoyo_free(symlink_program_name); - tomoyo_free(tmp); + kfree(real_program_name); + kfree(symlink_program_name); + kfree(tmp); return retval; } |