[PATCH] RT: fix spin_trylock_irq

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sébastien Dugué
Date: Thursday, October 11, 2007 - 5:24 am

This patch fixes a bug in spin_trylock_irq() where __spin_trylock_irq() is
picked for regular (non-raw) spinlocks instead of _spin_trylock_irq().

  This results in systematic boot hangs and may have been going unnoticed
for quite some time as it only manifests (aside from a compile warning) when
booting with a NUMA config or when using the Chelsio T3 (cxgb3) driver as
these seems to be the sole users.


Signed-off-by: Sébastien Dugué <sebastien.dugue@bull.net>

---
 include/linux/spinlock.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23-rc9-rt2/include/linux/spinlock.h
===================================================================
--- linux-2.6.23-rc9-rt2.orig/include/linux/spinlock.h
+++ linux-2.6.23-rc9-rt2/include/linux/spinlock.h
@@ -501,7 +501,7 @@ do {									\
 
 #define spin_trylock_irq(lock)	\
 	__cond_lock(lock, PICK_SPIN_OP_RET(__spin_trylock_irq,		\
-		__spin_trylock_irq, lock))
+		_spin_trylock_irq, lock))
 
 #define spin_trylock_irqsave(lock, flags) \
 	__cond_lock(lock, PICK_SPIN_OP_RET(__spin_trylock_irqsave, 	\
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] RT: fix spin_trylock_irq, Sébastien Dugué, (Thu Oct 11, 5:24 am)
Re: [PATCH] RT: fix spin_trylock_irq, Steven Rostedt, (Thu Oct 11, 7:49 am)
Re: [PATCH] RT: fix spin_trylock_irq, Daniel Walker, (Mon Oct 15, 10:44 am)
Re: [PATCH] RT: fix spin_trylock_irq, Steven Rostedt, (Mon Oct 15, 11:14 am)
Re: [PATCH] RT: fix spin_trylock_irq, Daniel Walker, (Mon Oct 15, 1:06 pm)
Re: [PATCH] RT: fix spin_trylock_irq, Thomas Gleixner, (Mon Oct 15, 2:35 pm)
Re: [PATCH] RT: fix spin_trylock_irq, Daniel Walker, (Mon Oct 15, 2:44 pm)