parisc: Unbreak handling exceptions from kernel modules
authorHelge Deller <deller@gmx.de>
Fri, 8 Apr 2016 16:32:52 +0000 (18:32 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:05:23 +0000 (00:05 +0200)
commit14313e39f3b33368020206940fe88fcf777b657e
tree002e2b4ef79d141f9998bab2fff6ed25c92b5d03
parent2e5c1b752c46b2bc61aa81f23b5a10f3a97bda76
parisc: Unbreak handling exceptions from kernel modules

commit 2ef4dfd9d9f288943e249b78365a69e3ea3ec072 upstream.

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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/parisc/include/asm/uaccess.h
arch/parisc/kernel/asm-offsets.c
arch/parisc/lib/fixup.S
arch/parisc/mm/fault.c