[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1302031310-1765-4-git-send-email-matt@console-pimps.org>
Date: Tue, 5 Apr 2011 20:21:48 +0100
From: Matt Fleming <matt@...sole-pimps.org>
To: Tejun Heo <tj@...nel.org>, Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
"H. Peter Anvin" <hpa@...or.com>,
Matt Fleming <matt.fleming@...ux.intel.com>
Subject: [RFC][PATCH 3/5] ia64: Catch up with new sighand action spinlock
From: Matt Fleming <matt.fleming@...ux.intel.com>
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@...ux.intel.com>
---
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(¤t->sighand->siglock, flags);
+ write_lock_irqsave(¤t->sighand->action_lock, flags);
current->sighand->action[sig - 1].sa.sa_handler = SIG_DFL;
- spin_unlock_irqrestore(¤t->sighand->siglock, flags);
+ write_unlock_irqrestore(¤t->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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists