Commit b1bce48d authored by Zwane Mwaikambo's avatar Zwane Mwaikambo Committed by Linus Torvalds

[PATCH] Fix i386 SPINLOCK_MAGIC debugging

Using a label isn't sufficent anymore for determining the location of the
failed lock. Use __builtin_return_address instead.
Signed-off-by: default avatarZwane Mwaikambo <zwane@fsmlabs.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent effe5df5
......@@ -128,10 +128,8 @@ static inline int _raw_spin_trylock(spinlock_t *lock)
static inline void _raw_spin_lock(spinlock_t *lock)
{
#ifdef CONFIG_DEBUG_SPINLOCK
__label__ here;
here:
if (unlikely(lock->magic != SPINLOCK_MAGIC)) {
printk("eip: %p\n", &&here);
printk("eip: %p\n", __builtin_return_address(0));
BUG();
}
#endif
......@@ -143,10 +141,8 @@ static inline void _raw_spin_lock(spinlock_t *lock)
static inline void _raw_spin_lock_flags (spinlock_t *lock, unsigned long flags)
{
#ifdef CONFIG_DEBUG_SPINLOCK
__label__ here;
here:
if (unlikely(lock->magic != SPINLOCK_MAGIC)) {
printk("eip: %p\n", &&here);
printk("eip: %p\n", __builtin_return_address(0));
BUG();
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment