mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
	linux-kernel@vger.kernel.org,
	Matt Fleming <matt.fleming@linux.intel.com>
Subject: [PATCH] avr32: Don't acquire siglock when reading sighand action
Date: Wed, 30 Mar 2011 20:04:16 +0100	[thread overview]
Message-ID: <1301511856-9370-1-git-send-email-matt@console-pimps.org> (raw)

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


             reply	other threads:[~2011-03-30 19:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30 19:04 Matt Fleming [this message]
2011-04-02 16:37 ` Oleg Nesterov
2011-04-04 14:15   ` Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301511856-9370-1-git-send-email-matt@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=hans-christian.egtvedt@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@linux.intel.com \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®