#include <signal.h>
#include <errno.h>
-#include <asm/sigcontext.h>
#include "sysdep/ptrace.h"
#include "signal_user.h"
#include "user_util.h"
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;