summaryrefslogtreecommitdiff
path: root/arch/parisc/mm/fault.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2016-04-08 18:32:52 +0200
committerSasha Levin <sasha.levin@oracle.com>2016-04-20 01:08:54 -0400
commite213cce42b7107f64521eb1434e9dd5637ad777b (patch)
tree5fb187bd8755f013c8a77ce795e333aae9240336 /arch/parisc/mm/fault.c
parent9ccccafe228ec2a71a6df4268ce95c27e3d3c8cf (diff)
parisc: Unbreak handling exceptions from kernel modules
[ Upstream commit 2ef4dfd9d9f288943e249b78365a69e3ea3ec072 ] Handling exceptions from modules never worked on parisc. It was just masked by the fact that exceptions from modules don't happen during normal use. When a module triggers an exception in get_user() we need to load the main kernel dp value before accessing the exception_data structure, and afterwards restore the original dp value of the module on exit. Noticed-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch/parisc/mm/fault.c')
-rw-r--r--arch/parisc/mm/fault.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index e5120e653240..50d64a7fc672 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -151,6 +151,7 @@ int fixup_exception(struct pt_regs *regs)
struct exception_data *d;
d = this_cpu_ptr(&exception_data);
d->fault_ip = regs->iaoq[0];
+ d->fault_gp = regs->gr[27];
d->fault_space = regs->isr;
d->fault_addr = regs->ior;