public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: akpm@osdl.org
To: torvalds@osdl.org
Cc: linux-arch@vger.kernel.org, akpm@osdl.org, wli@holomorphy.com
Subject: [patch 8/8] alpha signal race fixes
Date: Wed, 25 Aug 2004 14:38:45 -0700	[thread overview]
Message-ID: <200408252140.i7PLeS131604@mail.osdl.org> (raw)


From: William Lee Irwin III <wli@holomorphy.com>

The rampant variable renaming made my eyes bleed, so I omitted that from
here.  Anyhow, the test app works after I apply this, so I must have done
something right.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/alpha/kernel/signal.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -puN arch/alpha/kernel/signal.c~signal-race-fix-alpha arch/alpha/kernel/signal.c
--- 25/arch/alpha/kernel/signal.c~signal-race-fix-alpha	2004-08-25 14:26:52.148767688 -0700
+++ 25-akpm/arch/alpha/kernel/signal.c	2004-08-25 14:26:52.152767080 -0700
@@ -470,7 +470,7 @@ setup_frame(int sig, struct k_sigaction 
 
 give_sigsegv:
 	if (sig == SIGSEGV)
-		ka->sa.sa_handler = SIG_DFL;
+		current->sighand->action[sig-1].sa.sa_handler = SIG_DFL;
 	force_sig(SIGSEGV, current);
 }
 
@@ -534,7 +534,7 @@ setup_rt_frame(int sig, struct k_sigacti
 
 give_sigsegv:
 	if (sig == SIGSEGV)
-		ka->sa.sa_handler = SIG_DFL;
+		current->sighand->action[sig-1].sa.sa_handler = SIG_DFL;
 	force_sig(SIGSEGV, current);
 }
 
@@ -608,21 +608,20 @@ do_signal(sigset_t *oldset, struct pt_re
 	siginfo_t info;
 	int signr;
 	unsigned long single_stepping = ptrace_cancel_bpt(current);
+	struct k_sigaction ka;
 
 	if (!oldset)
 		oldset = &current->blocked;
 
 	/* This lets the debugger run, ... */
-	signr = get_signal_to_deliver(&info, regs, NULL);
+	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
 	/* ... so re-check the single stepping. */
 	single_stepping |= ptrace_cancel_bpt(current);
 
 	if (signr > 0) {
 		/* Whee!  Actually deliver the signal.  */
-		struct k_sigaction *ka = &current->sighand->action[signr-1];
-
-		if (r0) syscall_restart(r0, r19, regs, ka);
-		handle_signal(signr, ka, &info, oldset, regs, sw);
+		if (r0) syscall_restart(r0, r19, regs, &ka);
+		handle_signal(signr, &ka, &info, oldset, regs, sw);
 		if (single_stepping) 
 			ptrace_set_bpt(current); /* re-set bpt */
 		return 1;
_

             reply	other threads:[~2004-08-25 21:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 21:38 akpm [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-08-26  0:36 [patch 8/8] alpha signal race fixes akpm
2004-08-25 21:30 akpm
2004-08-25 22:26 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200408252140.i7PLeS131604@mail.osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox