patch-2.1.37 linux/arch/i386/mm/fault.c
Next file: linux/arch/i386/mm/init.c
Previous file: linux/arch/i386/lib/semaphore.S
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Mon May 12 17:39:50 1997
- Orig file:
v2.1.36/linux/arch/i386/mm/fault.c
- Orig date:
Sun Apr 13 10:18:20 1997
diff -u --recursive --new-file v2.1.36/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
@@ -49,7 +49,7 @@
start &= PAGE_MASK;
for (;;) {
- do_wp_page(current, vma, start, 1);
+ handle_mm_fault(vma, start, 1);
if (!size)
break;
size--;
@@ -86,10 +86,6 @@
*/
asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
{
- void (*handler)(struct task_struct *,
- struct vm_area_struct *,
- unsigned long,
- int);
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->mm;
struct vm_area_struct * vma;
@@ -128,10 +124,8 @@
*/
good_area:
write = 0;
- handler = do_no_page;
switch (error_code & 3) {
default: /* 3: write, present */
- handler = do_wp_page;
#ifdef TEST_VERIFY_AREA
if (regs->cs == KERNEL_CS)
printk("WP fault at %08lx\n", regs->eip);
@@ -148,7 +142,7 @@
if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
}
- handler(tsk, vma, address, write);
+ handle_mm_fault(vma, address, write);
up(&mm->mmap_sem);
/*
* Did it hit the DOS screen memory VA from vm86 mode?
@@ -169,7 +163,10 @@
/* Are we prepared to handle this fault? */
if ((fixup = search_exception_table(regs->eip)) != 0) {
- printk(KERN_DEBUG "Exception at [<%lx>] (%lx)\n", regs->eip, fixup);
+ printk(KERN_DEBUG "%s: Exception at [<%lx>] (%lx)\n",
+ current->comm,
+ regs->eip,
+ fixup);
regs->eip = fixup;
goto out;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov