diff options
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r-- | mm/kmemleak.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 31f01c5..e126b0e 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -753,9 +753,7 @@ static void add_scan_area(unsigned long ptr, size_t size, gfp_t gfp) } spin_lock_irqsave(&object->lock, flags); - if (size == SIZE_MAX) { - size = object->pointer + object->size - ptr; - } else if (ptr + size > object->pointer + object->size) { + if (ptr + size > object->pointer + object->size) { kmemleak_warn("Scan area larger than object 0x%08lx\n", ptr); dump_object_info(object); kmem_cache_free(scan_area_cache, area); |