lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1314661157-22173-3-git-send-email-andi@firstfloor.org>
Date:	Mon, 29 Aug 2011 16:39:16 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, eric.dumazet@...il.com,
	Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 3/4] posix-timers: Don't disable interrupts in idr_lock

From: Andi Kleen <ak@...ux.intel.com>

idr_lock is only used for modifying a timer and never used from
interrupts, only from process context. So don't disable interrupts
while taking that lock.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 kernel/posix-timers.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index ef6721c..320659d 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -503,10 +503,9 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set)
 {
 	if (it_id_set) {
 		struct signal_struct *s = current->signal;
-		unsigned long flags;
-		spin_lock_irqsave(&s->idr_lock, flags);
+		spin_lock(&s->idr_lock);
 		idr_remove(&s->posix_timers_id, tmr->it_id);
-		spin_unlock_irqrestore(&s->idr_lock, flags);
+		spin_unlock(&s->idr_lock);
 	}
 	put_pid(tmr->it_pid);
 	sigqueue_free(tmr->sigq);
@@ -558,9 +557,9 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
 		error = -EAGAIN;
 		goto out;
 	}
-	spin_lock_irq(&s->idr_lock);
+	spin_lock(&s->idr_lock);
 	error = idr_get_new(&s->posix_timers_id, new_timer, &new_timer_id);
-	spin_unlock_irq(&s->idr_lock);
+	spin_unlock(&s->idr_lock);
 	if (error) {
 		if (error == -EAGAIN)
 			goto retry;
-- 
1.7.4.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

Powered by Openwall GNU/*/Linux Powered by OpenVZ