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
/
arm
/
mm
/
fault.c
diff --git
a/arch/arm/mm/fault.c
b/arch/arm/mm/fault.c
index
4a884ba
..
0e78479
100644
(file)
--- a/
arch/arm/mm/fault.c
+++ b/
arch/arm/mm/fault.c
@@
-8,7
+8,6
@@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/signal.h>
#include <linux/ptrace.h>
#include <linux/module.h>
#include <linux/signal.h>
#include <linux/ptrace.h>
@@
-132,10
+131,11
@@
__do_user_fault(struct task_struct *tsk, unsigned long addr,
force_sig_info(sig, &si, tsk);
}
force_sig_info(sig, &si, tsk);
}
-void
-do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr,
- unsigned int fsr, struct pt_regs *regs)
+void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
{
+ struct task_struct *tsk = current;
+ struct mm_struct *mm = tsk->active_mm;
+
/*
* If we are in kernel mode at this point, we
* have no context to handle this fault with.
/*
* If we are in kernel mode at this point, we
* have no context to handle this fault with.
@@
-171,7
+171,7
@@
good_area:
if (fsr & (1 << 11)) /* write? */
mask = VM_WRITE;
else
if (fsr & (1 << 11)) /* write? */
mask = VM_WRITE;
else
- mask = VM_READ|VM_EXEC;
+ mask = VM_READ|VM_EXEC
|VM_WRITE
;
fault = VM_FAULT_BADACCESS;
if (!(vma->vm_flags & mask))
fault = VM_FAULT_BADACCESS;
if (!(vma->vm_flags & mask))
@@
-198,7
+198,7
@@
survive:
return fault;
}
return fault;
}
- if (
tsk->pid != 1
)
+ if (
!is_init(tsk)
)
goto out;
/*
goto out;
/*
@@
-230,7
+230,7
@@
do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
* If we're in an interrupt or have no user
* context, we must not take the fault..
*/
* If we're in an interrupt or have no user
* context, we must not take the fault..
*/
- if (in_
interrupt
() || !mm)
+ if (in_
atomic
() || !mm)
goto no_context;
/*
goto no_context;
/*
@@
-267,7
+267,8
@@
do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
* happened to us that made us unable to handle
* the page fault gracefully.
*/
* happened to us that made us unable to handle
* the page fault gracefully.
*/
- printk("VM: killing process %s\n", tsk->comm);
+ printk("VM: killing process %s(%d:#%u)\n",
+ tsk->comm, tsk->pid, tsk->xid);
do_exit(SIGKILL);
return 0;
do_exit(SIGKILL);
return 0;
@@
-320,7
+321,6
@@
static int
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
- struct task_struct *tsk;
unsigned int index;
pgd_t *pgd, *pgd_k;
pmd_t *pmd, *pmd_k;
unsigned int index;
pgd_t *pgd, *pgd_k;
pmd_t *pmd, *pmd_k;
@@
-352,9
+352,7
@@
do_translation_fault(unsigned long addr, unsigned int fsr,
return 0;
bad_area:
return 0;
bad_area:
- tsk = current;
-
- do_bad_area(tsk, tsk->active_mm, addr, fsr, regs);
+ do_bad_area(addr, fsr, regs);
return 0;
}
return 0;
}
@@
-365,8
+363,7
@@
bad_area:
static int
do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
static int
do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
- struct task_struct *tsk = current;
- do_bad_area(tsk, tsk->active_mm, addr, fsr, regs);
+ do_bad_area(addr, fsr, regs);
return 0;
}
return 0;
}