提交 4b068148 编写于 作者: S Stephen Boyd 提交者: Linus Torvalds

spinlock_debug: print offset in addition to symbol name

If there are two spinlocks embedded in a structure that kallsyms knows
about and one of the spinlocks locks up we will print the name of the
containing structure instead of the address of the lock.  This is quite
bad, so let's use %pS instead of %ps so we get an offset in addition to
the symbol so we can determine which particular lock is having problems.
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7463449b
...@@ -58,7 +58,7 @@ static void spin_dump(raw_spinlock_t *lock, const char *msg) ...@@ -58,7 +58,7 @@ static void spin_dump(raw_spinlock_t *lock, const char *msg)
printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n", printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
msg, raw_smp_processor_id(), msg, raw_smp_processor_id(),
current->comm, task_pid_nr(current)); current->comm, task_pid_nr(current));
printk(KERN_EMERG " lock: %ps, .magic: %08x, .owner: %s/%d, " printk(KERN_EMERG " lock: %pS, .magic: %08x, .owner: %s/%d, "
".owner_cpu: %d\n", ".owner_cpu: %d\n",
lock, lock->magic, lock, lock->magic,
owner ? owner->comm : "<none>", owner ? owner->comm : "<none>",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册