public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] avr32: Don't acquire siglock when reading sighand action
@ 2011-03-30 19:04 Matt Fleming
  2011-04-02 16:37 ` Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Fleming @ 2011-03-30 19:04 UTC (permalink / raw)
  To: Hans-Christian Egtvedt; +Cc: Oleg Nesterov, linux-kernel, Matt Fleming

From: Matt Fleming <matt.fleming@linux.intel.com>

There's no need to acquire the siglock when simply reading the action
handler. We would need to lock it if we were modifying the handler or
we were protecting it from modification across function calls, but if
we're just reading it, there's no need to lock it

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
---
 arch/avr32/kernel/traps.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index b91b204..82f47e6 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -106,9 +106,7 @@ void _exception(long signr, struct pt_regs *regs, int code,
 	if (is_global_init(current)) {
 		__sighandler_t handler;
 
-		spin_lock_irq(&current->sighand->siglock);
 		handler = current->sighand->action[signr-1].sa.sa_handler;
-		spin_unlock_irq(&current->sighand->siglock);
 		if (handler == SIG_DFL) {
 			/* init has generated a synchronous exception
 			   and it doesn't have a handler for the signal */
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-04 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30 19:04 [PATCH] avr32: Don't acquire siglock when reading sighand action Matt Fleming
2011-04-02 16:37 ` Oleg Nesterov
2011-04-04 14:15   ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox