Commit 2a591ac4 authored by Zwane Mwaikambo's avatar Zwane Mwaikambo Committed by Linus Torvalds

[PATCH] Fix x86_64 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 b1bce48d
...@@ -113,10 +113,8 @@ static inline int _raw_spin_trylock(spinlock_t *lock) ...@@ -113,10 +113,8 @@ static inline int _raw_spin_trylock(spinlock_t *lock)
static inline void _raw_spin_lock(spinlock_t *lock) static inline void _raw_spin_lock(spinlock_t *lock)
{ {
#ifdef CONFIG_DEBUG_SPINLOCK #ifdef CONFIG_DEBUG_SPINLOCK
__label__ here;
here:
if (lock->magic != SPINLOCK_MAGIC) { if (lock->magic != SPINLOCK_MAGIC) {
printk("eip: %p\n", &&here); printk("eip: %p\n", __builtin_return_address(0));
BUG(); BUG();
} }
#endif #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