summaryrefslogtreecommitdiff
path: root/arch/loongarch/mm/kasan_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/mm/kasan_init.c')
-rw-r--r--arch/loongarch/mm/kasan_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/loongarch/mm/kasan_init.c b/arch/loongarch/mm/kasan_init.c
index cc3e81fe0186..c608adc99845 100644
--- a/arch/loongarch/mm/kasan_init.c
+++ b/arch/loongarch/mm/kasan_init.c
@@ -44,6 +44,9 @@ void *kasan_mem_to_shadow(const void *addr)
unsigned long xrange = (maddr >> XRANGE_SHIFT) & 0xffff;
unsigned long offset = 0;
+ if (maddr >= FIXADDR_START)
+ return (void *)(kasan_early_shadow_page);
+
maddr &= XRANGE_SHADOW_MASK;
switch (xrange) {
case XKPRANGE_CC_SEG: