Commit 6d90aa6c authored by Russell King's avatar Russell King

[ARm] Fix ARM exception table fixups for 2.5.55 updates.

parent 45becf16
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -102,23 +103,25 @@ static void ...@@ -102,23 +103,25 @@ static void
__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
struct pt_regs *regs) struct pt_regs *regs)
{ {
unsigned long fixup; const struct exception_table_entry *fixup;
/* /*
* Are we prepared to handle this kernel fault? * Are we prepared to handle this kernel fault?
*/ */
if ((fixup = search_exception_table(instruction_pointer(regs))) != 0) { fixup = search_exception_tables(instruction_pointer(regs));
if (fixup) {
#ifdef DEBUG #ifdef DEBUG
printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n", printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n",
current->comm, regs->ARM_pc, addr, fixup); current->comm, regs->ARM_pc, addr, fixup->fixup);
#endif #endif
regs->ARM_pc = fixup; regs->ARM_pc = fixup->fixup;
return; return;
} }
/* /*
* No handler, we'll have to terminate things with extreme prejudice. * No handler, we'll have to terminate things with extreme prejudice.
*/ */
bust_spinlocks(1);
printk(KERN_ALERT printk(KERN_ALERT
"Unable to handle kernel %s at virtual address %08lx\n", "Unable to handle kernel %s at virtual address %08lx\n",
(addr < PAGE_SIZE) ? "NULL pointer dereference" : (addr < PAGE_SIZE) ? "NULL pointer dereference" :
...@@ -126,6 +129,7 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, ...@@ -126,6 +129,7 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
show_pte(mm, addr); show_pte(mm, addr);
die("Oops", regs, fsr); die("Oops", regs, fsr);
bust_spinlocks(0);
do_exit(SIGKILL); do_exit(SIGKILL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment