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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
sparc
/
mm
/
fault.c
diff --git
a/arch/sparc/mm/fault.c
b/arch/sparc/mm/fault.c
index
dde63e1
..
f7b1a8a
100644
(file)
--- a/
arch/sparc/mm/fault.c
+++ b/
arch/sparc/mm/fault.c
@@
-23,7
+23,6
@@
#include <linux/module.h>
#include <asm/system.h>
#include <linux/module.h>
#include <asm/system.h>
-#include <asm/segment.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/memreg.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/memreg.h>
@@
-34,8
+33,6
@@
#include <asm/kdebug.h>
#include <asm/uaccess.h>
#include <asm/kdebug.h>
#include <asm/uaccess.h>
-#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))
-
extern int prom_node_root;
/* At boot time we determine these two values necessary for setting
extern int prom_node_root;
/* At boot time we determine these two values necessary for setting
@@
-294,16
+291,17
@@
good_area:
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
- case 1:
- current->min_flt++;
- break;
- case 2:
+ case VM_FAULT_SIGBUS:
+ goto do_sigbus;
+ case VM_FAULT_OOM:
+ goto out_of_memory;
+ case VM_FAULT_MAJOR:
current->maj_flt++;
break;
current->maj_flt++;
break;
- case 0:
- goto do_sigbus;
+ case VM_FAULT_MINOR:
default:
default:
- goto out_of_memory;
+ current->min_flt++;
+ break;
}
up_read(&mm->mmap_sem);
return;
}
up_read(&mm->mmap_sem);
return;
@@
-370,7
+368,8
@@
no_context:
*/
out_of_memory:
up_read(&mm->mmap_sem);
*/
out_of_memory:
up_read(&mm->mmap_sem);
- printk("VM: killing process %s\n", tsk->comm);
+ printk("VM: killing process %s(%d:#%u)\n",
+ tsk->comm, tsk->pid, tsk->xid);
if (from_user)
do_exit(SIGKILL);
goto no_context;
if (from_user)
do_exit(SIGKILL);
goto no_context;
@@
-535,8
+534,11
@@
good_area:
if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
}
if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
}
- if (!handle_mm_fault(mm, vma, address, write))
+ switch (handle_mm_fault(mm, vma, address, write)) {
+ case VM_FAULT_SIGBUS:
+ case VM_FAULT_OOM:
goto do_sigbus;
goto do_sigbus;
+ }
up_read(&mm->mmap_sem);
return;
bad_area:
up_read(&mm->mmap_sem);
return;
bad_area: