linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [patch 12/24] uml: Fix SKAS sig-handler reentrancy
@ 2005-02-05  1:50 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2005-02-05  1:50 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, blaisorblade, jdike, user-mode-linux-devel


From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>,
      Jeff Dike <jdike@addtoit.com>,

This adds code which enables SIGSEGV reception to the SKAS sig_handler_common,
which matches the tt code.

I still need to figure out why the SA_NODEFER flag was backed out in favor of
this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
CC: uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/kernel/skas/trap_user.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -puN arch/um/kernel/skas/trap_user.c~uml-fix-skas-sig-handler-reentrancy arch/um/kernel/skas/trap_user.c
--- 25/arch/um/kernel/skas/trap_user.c~uml-fix-skas-sig-handler-reentrancy	2005-02-04 17:23:04.000000000 -0800
+++ 25-akpm/arch/um/kernel/skas/trap_user.c	2005-02-04 17:23:04.000000000 -0800
@@ -20,6 +20,14 @@ void sig_handler_common_skas(int sig, vo
 	int save_errno = errno;
 	int save_user;
 
+	/* This is done because to allow SIGSEGV to be delivered inside a SEGV
+	 * handler.  This can happen in copy_user, and if SEGV is disabled,
+	 * the process will die.
+	 * XXX Figure out why this is better than SA_NODEFER
+	 */
+	if(sig == SIGSEGV)
+		change_sig(SIGSEGV, 1);
+
 	r = &TASK_REGS(get_current())->skas;
 	save_user = r->is_user;
 	r->is_user = 0;
_


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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] only message in thread

only message in thread, other threads:[~2005-02-05  1:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-05  1:50 [uml-devel] [patch 12/24] uml: Fix SKAS sig-handler reentrancy akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox