Merge "kmemleak: disable kasan instrumentation for kmemleak"

This commit is contained in:
Linux Build Service Account 2015-05-12 10:25:01 -07:00 committed by Gerrit - the friendly Code Review server
commit 090bf2637f

View file

@ -98,6 +98,7 @@
#include <asm/processor.h>
#include <linux/atomic.h>
#include <linux/kasan.h>
#include <linux/kmemcheck.h>
#include <linux/kmemleak.h>
#include <linux/memory_hotplug.h>
@ -1089,7 +1090,10 @@ static bool update_checksum(struct kmemleak_object *object)
if (!kmemcheck_is_obj_initialized(object->pointer, object->size))
return false;
kasan_disable_current();
object->checksum = crc32(0, (void *)object->pointer, object->size);
kasan_enable_current();
return object->checksum != old_csum;
}
@ -1140,7 +1144,9 @@ static void scan_block(void *_start, void *_end,
BYTES_PER_POINTER))
continue;
kasan_disable_current();
pointer = *ptr;
kasan_enable_current();
object = find_and_get_object(pointer, 1);
if (!object)