linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "um: Fix get_signal() usage"
@ 2016-01-25 22:33 Richard Weinberger
  0 siblings, 0 replies; only message in thread
From: Richard Weinberger @ 2016-01-25 22:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Richard Weinberger, Jeff Dike, Ingo Molnar, Andy Lutomirski,
	user-mode-linux-devel, user-mode-linux-user

Commit db2f24dc240856fb1d78005307f1523b7b3c121b
was plain wrong. I did not realize the we are
allowed to loop here.
In fact we have to loop and must not return to userspace
before all SIGSEGVs have been delivered.
Other archs do this directly in their entry code, UML
does it here.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>

diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
index fc8be0e..57acbd6 100644
--- a/arch/um/kernel/signal.c
+++ b/arch/um/kernel/signal.c
@@ -69,7 +69,7 @@ void do_signal(struct pt_regs *regs)
 	struct ksignal ksig;
 	int handled_sig = 0;
 
-	if (get_signal(&ksig)) {
+	while (get_signal(&ksig)) {
 		handled_sig = 1;
 		/* Whee!  Actually deliver the signal.  */
 		handle_signal(&ksig, regs);
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-25 22:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 22:33 [PATCH] Revert "um: Fix get_signal() usage" Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).