git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86: disable X86_PTRACE_BTS
[safe/jmp/linux-2.6]
/
mm
/
mmap.c
diff --git
a/mm/mmap.c
b/mm/mmap.c
index
505a454
..
d4855a6
100644
(file)
--- a/
mm/mmap.c
+++ b/
mm/mmap.c
@@
-175,7
+175,8
@@
int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
/* Don't let a single process grow too big:
leave 3% of the size of this process for other processes */
/* Don't let a single process grow too big:
leave 3% of the size of this process for other processes */
- allowed -= mm->total_vm / 32;
+ if (mm)
+ allowed -= mm->total_vm / 32;
/*
* cast `allowed' as a signed long because vm_committed_space
/*
* cast `allowed' as a signed long because vm_committed_space
@@
-410,7
+411,7
@@
void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma,
rb_insert_color(&vma->vm_rb, &mm->mm_rb);
}
rb_insert_color(&vma->vm_rb, &mm->mm_rb);
}
-static
inline
void __vma_link_file(struct vm_area_struct *vma)
+static void __vma_link_file(struct vm_area_struct *vma)
{
struct file * file;
{
struct file * file;
@@
-1591,7
+1592,7
@@
static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un
* vma is the last one with address > vma->vm_end. Have to extend vma.
*/
#ifndef CONFIG_IA64
* vma is the last one with address > vma->vm_end. Have to extend vma.
*/
#ifndef CONFIG_IA64
-static
inline
+static
#endif
int expand_upwards(struct vm_area_struct *vma, unsigned long address)
{
#endif
int expand_upwards(struct vm_area_struct *vma, unsigned long address)
{
@@
-1641,7
+1642,7
@@
int expand_upwards(struct vm_area_struct *vma, unsigned long address)
/*
* vma is the first one with address < vma->vm_start. Have to extend vma.
*/
/*
* vma is the first one with address < vma->vm_start. Have to extend vma.
*/
-static in
line in
t expand_downwards(struct vm_area_struct *vma,
+static int expand_downwards(struct vm_area_struct *vma,
unsigned long address)
{
int error;
unsigned long address)
{
int error;