All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] SIGSEGV and SA_NODEFER
@ 2005-01-18 21:28 Jeff Dike
  2005-01-20  0:07 ` Blaisorblade
  0 siblings, 1 reply; 19+ messages in thread
From: Jeff Dike @ 2005-01-18 21:28 UTC (permalink / raw)
  To: Blaisorblade, Christopher S. Aker; +Cc: user-mode-linux-devel

It turns out that caker's crashes were being caused by the lack of SA_NODEFER
in the SIGSEGV handler registration.

I know I fixed this, and I have no idea where the fix went.  Do you have any
clue what happened to it?

Patch below...

				Jeff

Index: 2.6.10/arch/um/kernel/process.c
===================================================================
--- 2.6.10.orig/arch/um/kernel/process.c        2005-01-17 12:27:47.000000000 -0500
+++ 2.6.10/arch/um/kernel/process.c     2005-01-18 13:55:28.000000000 -0500
@@ -60,7 +60,10 @@
 {
        int flags = altstack ? SA_ONSTACK : 0;
 
-       set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags,
+       /* SIGSEGV needs to be SA_NODEFER because segfaults can happen while
+        * the segfault handler is on the stack.
+        */
+       set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags | SA_NODEFER,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
        set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, 
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2005-01-25 23:45 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-18 21:28 [uml-devel] SIGSEGV and SA_NODEFER Jeff Dike
2005-01-20  0:07 ` Blaisorblade
2005-01-20  3:52   ` Rob Landley
2005-01-21 12:35     ` Blaisorblade
2005-01-21 18:18       ` Rob Landley
2005-01-21 19:58         ` Blaisorblade
2005-01-22 16:34           ` Rob Landley
2005-01-24 19:45             ` Blaisorblade
2005-01-25  1:38               ` Rob Landley
     [not found]               ` <20050125084506.GA562@bytesex>
2005-01-25 10:16                 ` Blaisorblade
2005-01-25 10:16                   ` Rob Landley
2005-01-25 11:40                     ` Blaisorblade
2005-01-25 17:30                       ` Rob Landley
2005-01-25 19:34                         ` Blaisorblade
2005-01-25 19:30                           ` Rob Landley
2005-01-25 20:50                             ` Blaisorblade
2005-01-25 22:43                               ` Rob Landley
2005-01-21 13:09   ` Blaisorblade
2005-01-21 16:56     ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.