Message ID | 20141105180322.GO32700@e104818-lin.cambridge.arm.com |
---|---|
State | New |
Headers | show |
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 3cda50c1e394..eab2bf39a3f3 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1226,6 +1226,12 @@ static void scan_object(struct kmemleak_object *object) if (!(object->flags & OBJECT_ALLOCATED)) /* already freed object */ goto out; + if (!kern_addr_valid(object->pointer)) { + kmemleak_warn("Invalid object address: 0x%08lx\n", + object->pointer); + dump_object_info(object); + goto out; + } if (hlist_empty(&object->area_list)) { void *start = (void *)object->pointer; void *end = (void *)(object->pointer + object->size);