mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
Merge "kmemleak: disable kasan instrumentation for kmemleak"
This commit is contained in:
commit
090bf2637f
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue