* [patch 8/8] alpha signal race fixes
@ 2004-08-25 21:30 akpm
2004-08-25 22:26 ` Richard Henderson
0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2004-08-25 21:30 UTC (permalink / raw)
To: torvalds; +Cc: linux-arch, akpm, wli
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 = ¤t->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 = ¤t->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;
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 8/8] alpha signal race fixes
@ 2004-08-25 21:38 akpm
0 siblings, 0 replies; 4+ messages in thread
From: akpm @ 2004-08-25 21:38 UTC (permalink / raw)
To: torvalds; +Cc: linux-arch, akpm, wli
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 = ¤t->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 = ¤t->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;
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 8/8] alpha signal race fixes
2004-08-25 21:30 [patch 8/8] alpha signal race fixes akpm
@ 2004-08-25 22:26 ` Richard Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2004-08-25 22:26 UTC (permalink / raw)
To: akpm; +Cc: torvalds, linux-arch, wli
On Wed, Aug 25, 2004 at 02:30:17PM -0700, akpm@osdl.org wrote:
> 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.
Looks about like what I tested a while ago. Sorry for not
sending it on.
And, like you, I didn't like all the variable renaming. ;-)
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 8/8] alpha signal race fixes
@ 2004-08-26 0:36 akpm
0 siblings, 0 replies; 4+ messages in thread
From: akpm @ 2004-08-26 0:36 UTC (permalink / raw)
To: torvalds; +Cc: linux-arch, akpm, wli
From: William Lee Irwin III <wli@holomorphy.com>
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 Wed Aug 25 17:13:42 2004
+++ 25-akpm/arch/alpha/kernel/signal.c Wed Aug 25 17:13:42 2004
@@ -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 = ¤t->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 = ¤t->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;
_
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-26 0:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-25 21:30 [patch 8/8] alpha signal race fixes akpm
2004-08-25 22:26 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2004-08-25 21:38 akpm
2004-08-26 0:36 akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox