diff options
author | Borislav Petkov <bp@suse.de> | 2018-02-26 08:49:26 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-02-28 09:25:44 -0500 |
commit | 04860d48a8aba5b21ae5ba1f86b0d4e3bc628fff (patch) | |
tree | fea89ab551cc6ee56ab21321db53aea641fd7542 | |
parent | 6ce5ae7977c89f2a09092954396a66c90e8213f2 (diff) |
locking/lockdep: Show unadorned pointers
Show unadorned pointers in lockdep reports - lockdep is a debugging
facility and hashing pointers there doesn't make a whole lotta sense.
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20180226134926.23069-1-bp@alien8.de
-rw-r--r-- | kernel/locking/lockdep.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 89b5f83f1969..12a2805dd64a 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c | |||
@@ -557,7 +557,7 @@ static void print_lock(struct held_lock *hlock) | |||
557 | } | 557 | } |
558 | 558 | ||
559 | print_lock_name(lock_classes + class_idx - 1); | 559 | print_lock_name(lock_classes + class_idx - 1); |
560 | printk(KERN_CONT ", at: [<%p>] %pS\n", | 560 | printk(KERN_CONT ", at: [<%px>] %pS\n", |
561 | (void *)hlock->acquire_ip, (void *)hlock->acquire_ip); | 561 | (void *)hlock->acquire_ip, (void *)hlock->acquire_ip); |
562 | } | 562 | } |
563 | 563 | ||
@@ -808,7 +808,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) | |||
808 | if (verbose(class)) { | 808 | if (verbose(class)) { |
809 | graph_unlock(); | 809 | graph_unlock(); |
810 | 810 | ||
811 | printk("\nnew class %p: %s", class->key, class->name); | 811 | printk("\nnew class %px: %s", class->key, class->name); |
812 | if (class->name_version > 1) | 812 | if (class->name_version > 1) |
813 | printk(KERN_CONT "#%d", class->name_version); | 813 | printk(KERN_CONT "#%d", class->name_version); |
814 | printk(KERN_CONT "\n"); | 814 | printk(KERN_CONT "\n"); |
@@ -1407,7 +1407,7 @@ static void print_lock_class_header(struct lock_class *class, int depth) | |||
1407 | } | 1407 | } |
1408 | printk("%*s }\n", depth, ""); | 1408 | printk("%*s }\n", depth, ""); |
1409 | 1409 | ||
1410 | printk("%*s ... key at: [<%p>] %pS\n", | 1410 | printk("%*s ... key at: [<%px>] %pS\n", |
1411 | depth, "", class->key, class->key); | 1411 | depth, "", class->key, class->key); |
1412 | } | 1412 | } |
1413 | 1413 | ||
@@ -2340,7 +2340,7 @@ cache_hit: | |||
2340 | 2340 | ||
2341 | if (very_verbose(class)) { | 2341 | if (very_verbose(class)) { |
2342 | printk("\nhash chain already cached, key: " | 2342 | printk("\nhash chain already cached, key: " |
2343 | "%016Lx tail class: [%p] %s\n", | 2343 | "%016Lx tail class: [%px] %s\n", |
2344 | (unsigned long long)chain_key, | 2344 | (unsigned long long)chain_key, |
2345 | class->key, class->name); | 2345 | class->key, class->name); |
2346 | } | 2346 | } |
@@ -2349,7 +2349,7 @@ cache_hit: | |||
2349 | } | 2349 | } |
2350 | 2350 | ||
2351 | if (very_verbose(class)) { | 2351 | if (very_verbose(class)) { |
2352 | printk("\nnew hash chain, key: %016Lx tail class: [%p] %s\n", | 2352 | printk("\nnew hash chain, key: %016Lx tail class: [%px] %s\n", |
2353 | (unsigned long long)chain_key, class->key, class->name); | 2353 | (unsigned long long)chain_key, class->key, class->name); |
2354 | } | 2354 | } |
2355 | 2355 | ||
@@ -2676,16 +2676,16 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this, | |||
2676 | void print_irqtrace_events(struct task_struct *curr) | 2676 | void print_irqtrace_events(struct task_struct *curr) |
2677 | { | 2677 | { |
2678 | printk("irq event stamp: %u\n", curr->irq_events); | 2678 | printk("irq event stamp: %u\n", curr->irq_events); |
2679 | printk("hardirqs last enabled at (%u): [<%p>] %pS\n", | 2679 | printk("hardirqs last enabled at (%u): [<%px>] %pS\n", |
2680 | curr->hardirq_enable_event, (void *)curr->hardirq_enable_ip, | 2680 | curr->hardirq_enable_event, (void *)curr->hardirq_enable_ip, |
2681 | (void *)curr->hardirq_enable_ip); | 2681 | (void *)curr->hardirq_enable_ip); |
2682 | printk("hardirqs last disabled at (%u): [<%p>] %pS\n", | 2682 | printk("hardirqs last disabled at (%u): [<%px>] %pS\n", |
2683 | curr->hardirq_disable_event, (void *)curr->hardirq_disable_ip, | 2683 | curr->hardirq_disable_event, (void *)curr->hardirq_disable_ip, |
2684 | (void *)curr->hardirq_disable_ip); | 2684 | (void *)curr->hardirq_disable_ip); |
2685 | printk("softirqs last enabled at (%u): [<%p>] %pS\n", | 2685 | printk("softirqs last enabled at (%u): [<%px>] %pS\n", |
2686 | curr->softirq_enable_event, (void *)curr->softirq_enable_ip, | 2686 | curr->softirq_enable_event, (void *)curr->softirq_enable_ip, |
2687 | (void *)curr->softirq_enable_ip); | 2687 | (void *)curr->softirq_enable_ip); |
2688 | printk("softirqs last disabled at (%u): [<%p>] %pS\n", | 2688 | printk("softirqs last disabled at (%u): [<%px>] %pS\n", |
2689 | curr->softirq_disable_event, (void *)curr->softirq_disable_ip, | 2689 | curr->softirq_disable_event, (void *)curr->softirq_disable_ip, |
2690 | (void *)curr->softirq_disable_ip); | 2690 | (void *)curr->softirq_disable_ip); |
2691 | } | 2691 | } |
@@ -3207,7 +3207,7 @@ static void __lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
3207 | * Sanity check, the lock-class key must be persistent: | 3207 | * Sanity check, the lock-class key must be persistent: |
3208 | */ | 3208 | */ |
3209 | if (!static_obj(key)) { | 3209 | if (!static_obj(key)) { |
3210 | printk("BUG: key %p not in .data!\n", key); | 3210 | printk("BUG: key %px not in .data!\n", key); |
3211 | /* | 3211 | /* |
3212 | * What it says above ^^^^^, I suggest you read it. | 3212 | * What it says above ^^^^^, I suggest you read it. |
3213 | */ | 3213 | */ |
@@ -3322,7 +3322,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
3322 | } | 3322 | } |
3323 | atomic_inc((atomic_t *)&class->ops); | 3323 | atomic_inc((atomic_t *)&class->ops); |
3324 | if (very_verbose(class)) { | 3324 | if (very_verbose(class)) { |
3325 | printk("\nacquire class [%p] %s", class->key, class->name); | 3325 | printk("\nacquire class [%px] %s", class->key, class->name); |
3326 | if (class->name_version > 1) | 3326 | if (class->name_version > 1) |
3327 | printk(KERN_CONT "#%d", class->name_version); | 3327 | printk(KERN_CONT "#%d", class->name_version); |
3328 | printk(KERN_CONT "\n"); | 3328 | printk(KERN_CONT "\n"); |
@@ -4376,7 +4376,7 @@ print_freed_lock_bug(struct task_struct *curr, const void *mem_from, | |||
4376 | pr_warn("WARNING: held lock freed!\n"); | 4376 | pr_warn("WARNING: held lock freed!\n"); |
4377 | print_kernel_ident(); | 4377 | print_kernel_ident(); |
4378 | pr_warn("-------------------------\n"); | 4378 | pr_warn("-------------------------\n"); |
4379 | pr_warn("%s/%d is freeing memory %p-%p, with a lock still held there!\n", | 4379 | pr_warn("%s/%d is freeing memory %px-%px, with a lock still held there!\n", |
4380 | curr->comm, task_pid_nr(curr), mem_from, mem_to-1); | 4380 | curr->comm, task_pid_nr(curr), mem_from, mem_to-1); |
4381 | print_lock(hlock); | 4381 | print_lock(hlock); |
4382 | lockdep_print_held_locks(curr); | 4382 | lockdep_print_held_locks(curr); |