diff options
author | David S. Miller <davem@davemloft.net> | 2021-02-26 16:16:24 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-26 16:16:24 -0800 |
commit | cf64c2a905e0dabcc473ca70baf275fb3a61fac4 (patch) | |
tree | 41600722fc372ef167048622e5959cdf7e458aea /arch/sparc/kernel/unaligned_32.c | |
parent | b9d62433114108eb45d4cae04abccb9b30ac005d (diff) | |
parent | 73686e787b495a85551e2e99c459adde6836eb31 (diff) | |
download | linux-cf64c2a905e0dabcc473ca70baf275fb3a61fac4.tar.gz linux-cf64c2a905e0dabcc473ca70baf275fb3a61fac4.tar.bz2 linux-cf64c2a905e0dabcc473ca70baf275fb3a61fac4.zip |
Merge branch 'work.sparc32' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Diffstat (limited to 'arch/sparc/kernel/unaligned_32.c')
-rw-r--r-- | arch/sparc/kernel/unaligned_32.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c index 82b60d09ea3c..ef5c5207c9ff 100644 --- a/arch/sparc/kernel/unaligned_32.c +++ b/arch/sparc/kernel/unaligned_32.c @@ -16,6 +16,7 @@ #include <linux/uaccess.h> #include <linux/smp.h> #include <linux/perf_event.h> +#include <linux/extable.h> #include <asm/setup.h> @@ -213,10 +214,10 @@ static inline int ok_for_kernel(unsigned int insn) static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) { - unsigned long g2 = regs->u_regs [UREG_G2]; - unsigned long fixup = search_extables_range(regs->pc, &g2); + const struct exception_table_entry *entry; - if (!fixup) { + entry = search_exception_tables(regs->pc); + if (!entry) { unsigned long address = compute_effective_address(regs, insn); if(address < PAGE_SIZE) { printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference in mna handler"); @@ -232,9 +233,8 @@ static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) die_if_kernel("Oops", regs); /* Not reached */ } - regs->pc = fixup; + regs->pc = entry->fixup; regs->npc = regs->pc + 4; - regs->u_regs [UREG_G2] = g2; } asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) |