diff options
| author | Jan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de> | 2016-09-04 16:45:09 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-10 00:45:11 +0200 |
| commit | 0a1e8e11acd3cc36b1d65023ce1cb1a06a887b11 (patch) | |
| tree | bd92a01ee850567d86074cca3fb6c928c960fe39 /arch/parisc/kernel/unaligned.c | |
| parent | ade0200dcde3ad70876875392b6bc156155b9b75 (diff) | |
3.10.102-> 3.10.103
Diffstat (limited to 'arch/parisc/kernel/unaligned.c')
| -rw-r--r-- | arch/parisc/kernel/unaligned.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index d7c0acb35..8d49614d6 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c @@ -666,7 +666,7 @@ void handle_unaligned(struct pt_regs *regs) break; } - if (modify && R1(regs->iir)) + if (ret == 0 && modify && R1(regs->iir)) regs->gr[R1(regs->iir)] = newbase; @@ -677,6 +677,14 @@ void handle_unaligned(struct pt_regs *regs) if (ret) { + /* + * The unaligned handler failed. + * If we were called by __get_user() or __put_user() jump + * to it's exception fixup handler instead of crashing. + */ + if (!user_mode(regs) && fixup_exception(regs)) + return; + printk(KERN_CRIT "Unaligned handler failed, ret = %d\n", ret); die_if_kernel("Unaligned data reference", regs, 28); |
