summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r--lib/debugobjects.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 547f7f923dbc..bf2c8b1043d8 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -7,9 +7,6 @@
*
* For licencing details see kernel-base/COPYING
*/
-
-#define pr_fmt(fmt) "ODEBUG: " fmt
-
#include <linux/debugobjects.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
@@ -199,7 +196,7 @@ static void free_object(struct debug_obj *obj)
* initialized:
*/
if (obj_pool_free > ODEBUG_POOL_SIZE && obj_cache)
- sched = keventd_up();
+ sched = keventd_up() && !work_pending(&debug_obj_work);
hlist_add_head(&obj->node, &obj_pool);
obj_pool_free++;
obj_pool_used--;
@@ -221,7 +218,7 @@ static void debug_objects_oom(void)
unsigned long flags;
int i;
- pr_warn("Out of memory. ODEBUG disabled\n");
+ printk(KERN_WARNING "ODEBUG: Out of memory. ODEBUG disabled\n");
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
raw_spin_lock_irqsave(&db->lock, flags);
@@ -295,9 +292,11 @@ static void debug_object_is_on_stack(void *addr, int onstack)
limit++;
if (is_on_stack)
- pr_warn("object is on stack, but not annotated\n");
+ printk(KERN_WARNING
+ "ODEBUG: object is on stack, but not annotated\n");
else
- pr_warn("object is not on stack, but annotated\n");
+ printk(KERN_WARNING
+ "ODEBUG: object is not on stack, but annotated\n");
WARN_ON(1);
}
@@ -986,7 +985,7 @@ static void __init debug_objects_selftest(void)
if (check_results(&obj, ODEBUG_STATE_NONE, ++fixups, ++warnings))
goto out;
#endif
- pr_info("selftest passed\n");
+ printk(KERN_INFO "ODEBUG: selftest passed\n");
out:
debug_objects_fixups = oldfixups;
@@ -1061,8 +1060,8 @@ static int __init debug_objects_replace_static_objects(void)
}
local_irq_enable();
- pr_debug("%d of %d active objects replaced\n",
- cnt, obj_pool_used);
+ printk(KERN_DEBUG "ODEBUG: %d of %d active objects replaced\n", cnt,
+ obj_pool_used);
return 0;
free:
hlist_for_each_entry_safe(obj, tmp, &objects, node) {
@@ -1091,7 +1090,7 @@ void __init debug_objects_mem_init(void)
debug_objects_enabled = 0;
if (obj_cache)
kmem_cache_destroy(obj_cache);
- pr_warn("out of memory.\n");
+ printk(KERN_WARNING "ODEBUG: out of memory.\n");
} else
debug_objects_selftest();
}