alpha signal race fixes
Subsystems (2)
PATCH 8/8 alpha signal race fixes
From: William Lee Irwin III <[email protected]>
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 <[email protected]>
---
25-akpm/arch/alpha/kernel/signal.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-)
arch/alpha/kernel/signal.c renamed from arch/alpha/kernel/signal.c~signal-race-fix-alpha +6 -7
@@ -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_resiginfo_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 ;
_
Quoted 3 lines · On Wed, Aug 25, 2004 at 02:30:17PM -0700, [email protected] 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~