diff options
author | James Morris <jmorris@namei.org> | 2008-11-06 00:12:34 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-06 00:12:34 +0100 |
commit | e21e696edb498c7f7eed42ba3096f6bbe13927b6 (patch) | |
tree | 73b0bc28e45b0268f05c4b384a17bfb2140a73bc /security/security.c | |
parent | selinux: recognize netlink messages for 'ip addrlabel' (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
download | linux-e21e696edb498c7f7eed42ba3096f6bbe13927b6.tar.xz linux-e21e696edb498c7f7eed42ba3096f6bbe13927b6.zip |
Merge branch 'master' into next
Diffstat (limited to 'security/security.c')
-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); |