[RFC][PATCH 3/5] ia64: Catch up with new sighand action spinlock

From: Matt Fleming
Date: Tue Apr 05 2011 - 15:22:57 EST


From: Matt Fleming <matt.fleming@xxxxxxxxxxxxxxx>

Also delete the comment that says holding siglock might not be
necessary - it is, parts of signal code require that the handlers for
a sighand do not change.

Signed-off-by: Matt Fleming <matt.fleming@xxxxxxxxxxxxxxx>
---
arch/ia64/kernel/signal.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 7bdafc8..d3b37c4 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -308,18 +308,9 @@ force_sigsegv_info (int sig, void __user *addr)
struct siginfo si;

if (sig == SIGSEGV) {
- /*
- * Acquiring siglock around the sa_handler-update is almost
- * certainly overkill, but this isn't a
- * performance-critical path and I'd rather play it safe
- * here than having to debug a nasty race if and when
- * something changes in kernel/signal.c that would make it
- * no longer safe to modify sa_handler without holding the
- * lock.
- */
- spin_lock_irqsave(&current->sighand->siglock, flags);
+ write_lock_irqsave(&current->sighand->action_lock, flags);
current->sighand->action[sig - 1].sa.sa_handler = SIG_DFL;
- spin_unlock_irqrestore(&current->sighand->siglock, flags);
+ write_unlock_irqrestore(&current->sighand->action_lock, flags);
}
si.si_signo = SIGSEGV;
si.si_errno = 0;
--
1.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/