aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
commit3f17ea6dea8ba5668873afa54628a91aaa3fb1c0 (patch)
treeafbeb2accd4c2199ddd705ae943995b143a0af02 /lib/debugobjects.c
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
parent1a5700bc2d10cd379a795fd2bb377a190af5acd4 (diff)
Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r--lib/debugobjects.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index e0731c3db706..547f7f923dbc 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -7,6 +7,9 @@
7 * 7 *
8 * For licencing details see kernel-base/COPYING 8 * For licencing details see kernel-base/COPYING
9 */ 9 */
10
11#define pr_fmt(fmt) "ODEBUG: " fmt
12
10#include <linux/debugobjects.h> 13#include <linux/debugobjects.h>
11#include <linux/interrupt.h> 14#include <linux/interrupt.h>
12#include <linux/sched.h> 15#include <linux/sched.h>
@@ -218,7 +221,7 @@ static void debug_objects_oom(void)
218 unsigned long flags; 221 unsigned long flags;
219 int i; 222 int i;
220 223
221 printk(KERN_WARNING "ODEBUG: Out of memory. ODEBUG disabled\n"); 224 pr_warn("Out of memory. ODEBUG disabled\n");
222 225
223 for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) { 226 for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
224 raw_spin_lock_irqsave(&db->lock, flags); 227 raw_spin_lock_irqsave(&db->lock, flags);
@@ -292,11 +295,9 @@ static void debug_object_is_on_stack(void *addr, int onstack)
292 295
293 limit++; 296 limit++;
294 if (is_on_stack) 297 if (is_on_stack)
295 printk(KERN_WARNING 298 pr_warn("object is on stack, but not annotated\n");
296 "ODEBUG: object is on stack, but not annotated\n");
297 else 299 else
298 printk(KERN_WARNING 300 pr_warn("object is not on stack, but annotated\n");
299 "ODEBUG: object is not on stack, but annotated\n");
300 WARN_ON(1); 301 WARN_ON(1);
301} 302}
302 303
@@ -985,7 +986,7 @@ static void __init debug_objects_selftest(void)
985 if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings)) 986 if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings))
986 goto out; 987 goto out;
987#endif 988#endif
988 printk(KERN_INFO "ODEBUG: selftest passed\n"); 989 pr_info("selftest passed\n");
989 990
990out: 991out:
991 debug_objects_fixups = oldfixups; 992 debug_objects_fixups = oldfixups;
@@ -1060,8 +1061,8 @@ static int __init debug_objects_replace_static_objects(void)
1060 } 1061 }
1061 local_irq_enable(); 1062 local_irq_enable();
1062 1063
1063 printk(KERN_DEBUG "ODEBUG: %d of %d active objects replaced\n", cnt, 1064 pr_debug("%d of %d active objects replaced\n",
1064 obj_pool_used); 1065 cnt, obj_pool_used);
1065 return 0; 1066 return 0;
1066free: 1067free:
1067 hlist_for_each_entry_safe(obj, tmp, &objects, node) { 1068 hlist_for_each_entry_safe(obj, tmp, &objects, node) {
@@ -1090,7 +1091,7 @@ void __init debug_objects_mem_init(void)
1090 debug_objects_enabled = 0; 1091 debug_objects_enabled = 0;
1091 if (obj_cache) 1092 if (obj_cache)
1092 kmem_cache_destroy(obj_cache); 1093 kmem_cache_destroy(obj_cache);
1093 printk(KERN_WARNING "ODEBUG: out of memory.\n"); 1094 pr_warn("out of memory.\n");
1094 } else 1095 } else
1095 debug_objects_selftest(); 1096 debug_objects_selftest();
1096} 1097}