summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2018-03-15 20:01:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:47:38 +0200
commitaf794b799a80cb855e251de3748a25f3700f0587 (patch)
treeb30fb2472488cc49d2412f490f9006a9a070054d
parent8035424c9c5b4bd249a21866e6507c51e19e7ecd (diff)
downloadlinux-stable-af794b799a80cb855e251de3748a25f3700f0587.tar.gz
linux-stable-af794b799a80cb855e251de3748a25f3700f0587.tar.bz2
linux-stable-af794b799a80cb855e251de3748a25f3700f0587.zip
sh: fix debug trap failure to process signals before return to user
[ Upstream commit 96a598996f6ac518ac79839ecbb17c91af91f4f7 ] When responding to a debug trap (breakpoint) in userspace, the kernel's trap handler raised SIGTRAP but returned from the trap via a code path that ignored pending signals, resulting in an infinite loop re-executing the trapping instruction. Signed-off-by: Rich Felker <dalias@libc.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/sh/kernel/entry-common.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index 13047a4facd2..5a9017ba26ab 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -255,7 +255,7 @@ debug_trap:
mov.l @r8, r8
jsr @r8
nop
- bra __restore_all
+ bra ret_from_exception
nop
CFI_ENDPROC