--- zzzz-none-000/linux-2.6.13.1/arch/mips/kernel/unaligned.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/arch/mips/kernel/unaligned.c 2007-03-26 09:01:03.000000000 +0000 @@ -472,18 +472,27 @@ if (fixup_exception(regs)) return 1; + if (!user_mode(regs)) { + restore_printk(); /*--- standard-printk ---*/ + } die_if_kernel ("Unhandled kernel unaligned access", regs); send_sig(SIGSEGV, current, 1); return 0; sigbus: + if (!user_mode(regs)) { + restore_printk(); /*--- standard-printk ---*/ + } die_if_kernel("Unhandled kernel unaligned access", regs); send_sig(SIGBUS, current, 1); return 0; sigill: + if (!user_mode(regs)) { + restore_printk(); /*--- standard-printk ---*/ + } die_if_kernel("Unhandled kernel unaligned access or invalid instruction", regs); send_sig(SIGILL, current, 1); @@ -497,6 +506,10 @@ mm_segment_t seg; unsigned long pc; + /*Print information about origin of unaligned access ==20060623 SK==*/ + /*__print_symbol("[do_ade] %s ", regs->cp0_epc); + printk("(%s)\n", current->comm);*/ + /* * Address errors may be deliberately induced by the FPU emulator to * retake control of the CPU after executing the instruction in the @@ -541,6 +554,9 @@ return; sigbus: + if (!user_mode(regs)) { + restore_printk(); /*--- standard-printk ---*/ + } die_if_kernel("Kernel unaligned instruction access", regs); force_sig(SIGBUS, current);