git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
arch
/
ia64
/
mm
/
fault.c
diff --git
a/arch/ia64/mm/fault.c
b/arch/ia64/mm/fault.c
index
d823ff8
..
134d24b
100644
(file)
--- a/
arch/ia64/mm/fault.c
+++ b/
arch/ia64/mm/fault.c
@@
-9,12
+9,12
@@
#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
+#include <linux/vs_memory.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-#include <asm/hardirq.h>
extern void die (char *, struct pt_regs *, long);
extern void die (char *, struct pt_regs *, long);
@@
-34,12
+34,20
@@
expand_backing_store (struct vm_area_struct *vma, unsigned long address)
grow = PAGE_SIZE >> PAGE_SHIFT;
if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur
grow = PAGE_SIZE >> PAGE_SHIFT;
if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur
- || (((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur))
+ || (((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
+ current->rlim[RLIMIT_AS].rlim_cur))
+ return -ENOMEM;
+ if (!vx_vmpages_avail(vma->vm_mm, grow) ||
+ ((vma->vm_flags & VM_LOCKED) &&
+ !vx_vmlocked_avail(vma->vm_mm, grow)))
return -ENOMEM;
vma->vm_end += PAGE_SIZE;
return -ENOMEM;
vma->vm_end += PAGE_SIZE;
- vma->vm_mm->total_vm += grow;
+ // vma->vm_mm->total_vm += grow;
+ vx_vmpages_add(vma->vm_mm, grow);
if (vma->vm_flags & VM_LOCKED)
if (vma->vm_flags & VM_LOCKED)
- vma->vm_mm->locked_vm += grow;
+ // vma->vm_mm->locked_vm += grow;
+ vx_vmlocked_add(vma->vm_mm, grow);
+ __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow);
return 0;
}
return 0;
}
@@
-196,7
+204,7
@@
ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
si.si_signo = signal;
si.si_errno = 0;
si.si_code = code;
si.si_signo = signal;
si.si_errno = 0;
si.si_code = code;
- si.si_addr = (void *) address;
+ si.si_addr = (void
__user
*) address;
si.si_isr = isr;
si.si_flags = __ISR_VALID;
force_sig_info(signal, &si, current);
si.si_isr = isr;
si.si_flags = __ISR_VALID;
force_sig_info(signal, &si, current);