public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SELinux: Remove excessive interrupt disablement
@ 2009-04-29 12:47 David Howells
  2009-04-29 13:05 ` Oleg Nesterov
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2009-04-29 12:47 UTC (permalink / raw)
  To: linux-security-module, jmorris; +Cc: dhowells, oleg, linux-kernel

There's no need to disable interrupts with spin_lock_irqsave() inside of
read_lock_irq().

Signed-off-by: David Howells <dhowells@redhat.com>
---

 security/selinux/hooks.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index ba808ef..0702ba6 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2378,7 +2378,6 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm)
 	struct sighand_struct *psig;
 	u32 osid, sid;
 	int rc, i;
-	unsigned long flags;
 
 	osid = tsec->osid;
 	sid = tsec->sid;
@@ -2410,9 +2409,9 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm)
 	 * wait permission to the new task SID. */
 	read_lock_irq(&tasklist_lock);
 	psig = current->parent->sighand;
-	spin_lock_irqsave(&psig->siglock, flags);
+	spin_lock(&psig->siglock);
 	wake_up_interruptible(&current->parent->signal->wait_chldexit);
-	spin_unlock_irqrestore(&psig->siglock, flags);
+	spin_unlock(&psig->siglock);
 	read_unlock_irq(&tasklist_lock);
 }
 


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

* Re: [PATCH] SELinux: Remove excessive interrupt disablement
  2009-04-29 12:47 [PATCH] SELinux: Remove excessive interrupt disablement David Howells
@ 2009-04-29 13:05 ` Oleg Nesterov
  0 siblings, 0 replies; 2+ messages in thread
From: Oleg Nesterov @ 2009-04-29 13:05 UTC (permalink / raw)
  To: David Howells; +Cc: linux-security-module, jmorris, linux-kernel

On 04/29, David Howells wrote:
>
> @@ -2410,9 +2409,9 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm)
>  	 * wait permission to the new task SID. */
>  	read_lock_irq(&tasklist_lock);

_irq is not needed, just read_lock(&tasklist_lock) should be fine.

>  	psig = current->parent->sighand;
> -	spin_lock_irqsave(&psig->siglock, flags);
> +	spin_lock(&psig->siglock);

I think we don't need ->siglock at all.

>  	wake_up_interruptible(&current->parent->signal->wait_chldexit);

off-topic wrt this patch, but I believe we need

	__wake_up_parent(curremt, current->real_parent);

Oleg.


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

end of thread, other threads:[~2009-04-29 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 12:47 [PATCH] SELinux: Remove excessive interrupt disablement David Howells
2009-04-29 13:05 ` Oleg Nesterov

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