Commit 0ad6b38a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull debugobjects update from Thomas Gleixner:
 "Two simple updates for the debug objects code:

   - Make the stack check warning more informative by adding the object
     and the stack page address to the printout

   - Remove a redundant NULL pointer check"

* 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  debugobjects: Remove redundant NULL pointer check
  debugobjects: Make stack check warning more informative
parents 03e61914 3ff4f80a
...@@ -360,9 +360,12 @@ static void debug_object_is_on_stack(void *addr, int onstack) ...@@ -360,9 +360,12 @@ static void debug_object_is_on_stack(void *addr, int onstack)
limit++; limit++;
if (is_on_stack) if (is_on_stack)
pr_warn("object is on stack, but not annotated\n"); pr_warn("object %p is on stack %p, but NOT annotated.\n", addr,
task_stack_page(current));
else else
pr_warn("object is not on stack, but annotated\n"); pr_warn("object %p is NOT on stack %p, but annotated.\n", addr,
task_stack_page(current));
WARN_ON(1); WARN_ON(1);
} }
...@@ -1185,8 +1188,7 @@ void __init debug_objects_mem_init(void) ...@@ -1185,8 +1188,7 @@ void __init debug_objects_mem_init(void)
if (!obj_cache || debug_objects_replace_static_objects()) { if (!obj_cache || debug_objects_replace_static_objects()) {
debug_objects_enabled = 0; debug_objects_enabled = 0;
if (obj_cache) kmem_cache_destroy(obj_cache);
kmem_cache_destroy(obj_cache);
pr_warn("out of memory.\n"); pr_warn("out of memory.\n");
} else } else
debug_objects_selftest(); debug_objects_selftest();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment