diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-04-20 09:14:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-03 11:23:06 +0200 |
commit | c82ccd7122be45daa107244240a2ede87e562b86 (patch) | |
tree | 4ea7c6e8effd72e9218aafdfcb94ea4ec897ee04 | |
parent | d9c202b269dd752c977fb1eb3cc6875a69899648 (diff) | |
download | linux-stable-c82ccd7122be45daa107244240a2ede87e562b86.tar.gz linux-stable-c82ccd7122be45daa107244240a2ede87e562b86.tar.bz2 linux-stable-c82ccd7122be45daa107244240a2ede87e562b86.zip |
signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
commit 7de712ccc096b81d23cc0a941cd9b8cb3956605d upstream.
While working on changing this code to use force_sig_fault I
discovered that do_unaliged_user is sets si_signo to SIGBUS and passes
SIGSEGV to force_sig_info. Which is just b0rked.
The code is reporting a SIGBUS error so replace the SIGSEGV with SIGBUS.
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
Cc: stable@vger.kernel.org
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Fixes: 5a0015d62668 ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 3")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/xtensa/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index ce37d5b899fe..44bd9a377ad1 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -334,7 +334,7 @@ do_unaligned_user (struct pt_regs *regs) info.si_errno = 0; info.si_code = BUS_ADRALN; info.si_addr = (void *) regs->excvaddr; - force_sig_info(SIGSEGV, &info, current); + force_sig_info(SIGBUS, &info, current); } #endif |