forked from rubenslte/android_kernel_samsung_msm8226
spinlock_debug: Print kallsyms name for lock
When a spinlock warning is printed we usually get BUG: spinlock bad magic on CPU#0, modprobe/111 lock: 0xdff09f38, .magic: 00000000, .owner: /0, .owner_cpu: 0 but it's nicer to print the symbol for the lock if we have it so that we can avoid 'grep dff09f38 /proc/kallsyms' to find out which lock it was. Use kallsyms to print the symbol name so we get something a bit easier to read BUG: spinlock bad magic on CPU#0, modprobe/112 lock: test_lock, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Change-Id: I833d011da8362960e97c53ebd59236ac7eb147fd Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
@@ -61,7 +61,7 @@ static void spin_bug(raw_spinlock_t *lock, const char *msg)
|
||||
printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
|
||||
msg, raw_smp_processor_id(),
|
||||
current->comm, task_pid_nr(current));
|
||||
printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
|
||||
printk(KERN_EMERG " lock: %ps, .magic: %08x, .owner: %s/%d, "
|
||||
".owner_cpu: %d\n",
|
||||
lock, lock->magic,
|
||||
owner ? owner->comm : "<none>",
|
||||
@@ -114,7 +114,7 @@ static void __spin_lock_debug(raw_spinlock_t *lock)
|
||||
if (print_once) {
|
||||
print_once = 0;
|
||||
printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
|
||||
"%s/%d, %p\n",
|
||||
"%s/%d, %ps\n",
|
||||
raw_smp_processor_id(), current->comm,
|
||||
task_pid_nr(current), lock);
|
||||
dump_stack();
|
||||
|
||||
Reference in New Issue
Block a user