aboutsummaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2008-11-06 07:12:34 +0800
committerJames Morris <jmorris@namei.org>2008-11-06 07:12:34 +0800
commite21e696edb498c7f7eed42ba3096f6bbe13927b6 (patch)
tree73b0bc28e45b0268f05c4b384a17bfb2140a73bc /security/security.c
parent2f99db28af90957271a6448479c3e492ccf7c697 (diff)
parent75fa67706cce5272bcfc51ed646f2da21f3bdb6e (diff)
downloadkernel_samsung_smdk4412-e21e696edb498c7f7eed42ba3096f6bbe13927b6.zip
kernel_samsung_smdk4412-e21e696edb498c7f7eed42ba3096f6bbe13927b6.tar.gz
kernel_samsung_smdk4412-e21e696edb498c7f7eed42ba3096f6bbe13927b6.tar.bz2
Merge branch 'master' into next
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c
index 255b085..c0acfa7 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);