diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-10-31 16:18:02 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-31 16:18:02 +0900 |
commit | 0803d540db06f53acd2fabf1347d5b665218f14a (patch) | |
tree | f5f8e5510a76bb59d3583478961daf5afc32df08 /security | |
parent | a8884e3415c29c58a5875d54c109c4a7fcaa6fb4 (diff) | |
parent | 721d5dfe7e516954c501d5e9d0dfab379cf4241a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'security')
-rw-r--r-- | security/security.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c index 255b08559b2b..c0acfa7177e5 100644 --- a/security/security.c +++ b/security/security.c @@ -198,14 +198,23 @@ int security_settime(struct timespec *ts, struct timezone *tz) int security_vm_enough_memory(long pages) { + WARN_ON(current->mm == NULL); return security_ops->vm_enough_memory(current->mm, pages); } int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) { + WARN_ON(mm == NULL); return security_ops->vm_enough_memory(mm, pages); } +int security_vm_enough_memory_kern(long pages) +{ + /* If current->mm is a kernel thread then we will pass NULL, + for this specific case that is fine */ + return security_ops->vm_enough_memory(current->mm, pages); +} + int security_bprm_alloc(struct linux_binprm *bprm) { return security_ops->bprm_alloc_security(bprm); |