patch-2.4.13 linux/arch/arm/mm/fault-common.c
Next file: linux/arch/arm/mm/init.c
Previous file: linux/arch/arm/mm/fault-armv.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Thu Oct 11 09:04:57 2001
- Orig file:
v2.4.12/linux/arch/arm/mm/fault-common.c
- Orig date:
Mon Aug 27 12:41:38 2001
diff -u --recursive --new-file v2.4.12/linux/arch/arm/mm/fault-common.c linux/arch/arm/mm/fault-common.c
@@ -301,6 +301,10 @@
tsk->thread.error_code = error_code;
tsk->thread.trap_no = 14;
force_sig(SIGBUS, tsk);
+#ifdef CONFIG_DEBUG_USER
+ printk(KERN_DEBUG "%s: sigbus at 0x%08lx, pc=0x%08lx\n",
+ current->comm, addr, instruction_pointer(regs));
+#endif
/* Kernel mode? Handle exceptions or die */
if (user_mode(regs))
@@ -339,13 +343,10 @@
if (addr < TASK_SIZE)
return do_page_fault(addr, error_code, regs);
- tsk = current;
- mm = tsk->active_mm;
-
offset = __pgd_offset(addr);
+ pgd = cpu_get_pgd() + offset;
pgd_k = init_mm.pgd + offset;
- pgd = mm->pgd + offset;
if (pgd_none(*pgd_k))
goto bad_area;
@@ -365,6 +366,9 @@
return 0;
bad_area:
+ tsk = current;
+ mm = tsk->active_mm;
+
do_bad_area(tsk, mm, addr, error_code, regs);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)