diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-06-24 12:18:41 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-06-24 12:18:41 +0800 |
commit | bbe8f0ee88a1eb4bb1e72e593b008faf387f30ac (patch) | |
tree | 83368f0950f7396944642057dd521044b696b7f5 /arch/parisc | |
parent | 1beb6ea36b283c1dc34812c6ef9bf56a1e494f8c (diff) | |
parent | d420f00c7bfb405884dd71fb7f87974f0d1be455 (diff) |
Merge tag 'v3.18.36' into linux-linaro-lsk-v3.18lsk-v3.18-16.06
This is the 3.18.36 stable release
Diffstat (limited to 'arch/parisc')
-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 d7c0acb35ec2..8d49614d600d 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); |