sh: fix debug trap failure to process signals before return to user
authorRich Felker <dalias@libc.org>
Fri, 16 Mar 2018 00:01:36 +0000 (20:01 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:39 +0000 (07:50 +0200)
commitbec95d211f1256ebb8414225cb235f22c1a4aa12
tree0cc95971abdbc001e9e578e1a0c135e106d21d62
parent2b1c1ad87805cab84cca87a3705c3b3b8e196840
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>
arch/sh/kernel/entry-common.S