Skip to content

Commit

Permalink
kmemleak: Show more information for objects found by alias
Browse files Browse the repository at this point in the history
There may be situations when an object is freed using a pointer inside
the memory block. Kmemleak should show more information to help with
debugging.

Signed-off-by: Catalin Marinas <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
  • Loading branch information
ctmarinas committed Jul 19, 2010
1 parent 9078370 commit a7686a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/kmemleak.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ static struct kmemleak_object *lookup_object(unsigned long ptr, int alias)
object = prio_tree_entry(node, struct kmemleak_object,
tree_node);
if (!alias && object->pointer != ptr) {
kmemleak_warn("Found object by alias");
pr_warning("Found object by alias at 0x%08lx\n", ptr);
dump_stack();
dump_object_info(object);
object = NULL;
}
} else
Expand Down

0 comments on commit a7686a4

Please sign in to comment.