aboutsummaryrefslogtreecommitdiff
path: root/mm/kmemleak.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2021-04-20 10:13:58 +0200
committerIngo Molnar <mingo@kernel.org>2021-04-20 10:13:58 +0200
commitd0d252b8ca7a636640a7dca8606edf7c3bcfe0b8 (patch)
tree992b53f3c91669f3597e05997b61fa09db2155df /mm/kmemleak.c
parent9406415f46f6127fd31bb66f0260f7a61a8d2786 (diff)
parentbf05bf16c76bb44ab5156223e1e58e26dfe30a88 (diff)
Merge tag 'v5.12-rc8' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r--mm/kmemleak.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index c0014d3b91c1..fe6e3ae8e8c6 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -97,6 +97,7 @@
#include <linux/atomic.h>
#include <linux/kasan.h>
+#include <linux/kfence.h>
#include <linux/kmemleak.h>
#include <linux/memory_hotplug.h>
@@ -589,7 +590,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
atomic_set(&object->use_count, 1);
object->flags = OBJECT_ALLOCATED;
object->pointer = ptr;
- object->size = size;
+ object->size = kfence_ksize((void *)ptr) ?: size;
object->excess_ref = 0;
object->min_count = min_count;
object->count = 0; /* white color initially */