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.5.x5
[linux-2.6.git]
/
arch
/
ia64
/
mm
/
fault.c
diff --git
a/arch/ia64/mm/fault.c
b/arch/ia64/mm/fault.c
index
20d11f4
..
190996f
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);
@@
-33,10
+33,13
@@
expand_backing_store (struct vm_area_struct *vma, unsigned long address)
unsigned long grow;
grow = PAGE_SIZE >> PAGE_SHIFT;
unsigned long grow;
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))
+ if (address - vma->vm_start > current->signal->rlim[RLIMIT_STACK].rlim_cur
+ || (((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
+ current->signal->rlim[RLIMIT_AS].rlim_cur))
return -ENOMEM;
return -ENOMEM;
- if (!vx_vmpages_avail(vma->vm_mm, grow)
+ 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;
// vma->vm_mm->total_vm += grow;
return -ENOMEM;
vma->vm_end += PAGE_SIZE;
// vma->vm_mm->total_vm += grow;
@@
-44,6
+47,7
@@
expand_backing_store (struct vm_area_struct *vma, unsigned long address)
if (vma->vm_flags & VM_LOCKED)
// vma->vm_mm->locked_vm += grow;
vx_vmlocked_add(vma->vm_mm, grow);
if (vma->vm_flags & VM_LOCKED)
// 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;
}
@@
-55,6
+59,7
@@
static int
mapped_kernel_page_is_present (unsigned long address)
{
pgd_t *pgd;
mapped_kernel_page_is_present (unsigned long address)
{
pgd_t *pgd;
+ pud_t *pud;
pmd_t *pmd;
pte_t *ptep, pte;
pmd_t *pmd;
pte_t *ptep, pte;
@@
-62,7
+67,11
@@
mapped_kernel_page_is_present (unsigned long address)
if (pgd_none(*pgd) || pgd_bad(*pgd))
return 0;
if (pgd_none(*pgd) || pgd_bad(*pgd))
return 0;
- pmd = pmd_offset(pgd, address);
+ pud = pud_offset(pgd, address);
+ if (pud_none(*pud) || pud_bad(*pud))
+ return 0;
+
+ pmd = pmd_offset(pud, address);
if (pmd_none(*pmd) || pmd_bad(*pmd))
return 0;
if (pmd_none(*pmd) || pmd_bad(*pmd))
return 0;
@@
-200,7
+209,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);