diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-11-19 09:48:07 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-11-19 09:48:07 -0500 |
commit | dba0a918722ee0f0ba3442575e4448c3ab622be4 (patch) | |
tree | fdb466cf09e7916135098d651b18924b2fe9ba5f /security/security.c | |
parent | 0996e6382482ce9014787693d3884e9468153a5c (diff) | |
parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
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) | |||
198 | 198 | ||
199 | int security_vm_enough_memory(long pages) | 199 | int security_vm_enough_memory(long pages) |
200 | { | 200 | { |
201 | WARN_ON(current->mm == NULL); | ||
201 | return security_ops->vm_enough_memory(current->mm, pages); | 202 | return security_ops->vm_enough_memory(current->mm, pages); |
202 | } | 203 | } |
203 | 204 | ||
204 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | 205 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) |
205 | { | 206 | { |
207 | WARN_ON(mm == NULL); | ||
206 | return security_ops->vm_enough_memory(mm, pages); | 208 | return security_ops->vm_enough_memory(mm, pages); |
207 | } | 209 | } |
208 | 210 | ||
211 | int security_vm_enough_memory_kern(long pages) | ||
212 | { | ||
213 | /* If current->mm is a kernel thread then we will pass NULL, | ||
214 | for this specific case that is fine */ | ||
215 | return security_ops->vm_enough_memory(current->mm, pages); | ||
216 | } | ||
217 | |||
209 | int security_bprm_alloc(struct linux_binprm *bprm) | 218 | int security_bprm_alloc(struct linux_binprm *bprm) |
210 | { | 219 | { |
211 | return security_ops->bprm_alloc_security(bprm); | 220 | return security_ops->bprm_alloc_security(bprm); |