From f642033b989a9199514090b86017c7b1685c19b5 Mon Sep 17 00:00:00 2001 From: Thomas Vegas Date: Mon, 2 Oct 2023 10:18:24 +0300 Subject: [PATCH] KERNEL: Use pte offset kernel function for mapped pages --- kernel/xpmem_pfn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/xpmem_pfn.c b/kernel/xpmem_pfn.c index 0ba7da6..ce3d58f 100644 --- a/kernel/xpmem_pfn.c +++ b/kernel/xpmem_pfn.c @@ -164,7 +164,7 @@ xpmem_vaddr_to_pte_offset(struct mm_struct *mm, u64 vaddr, u64 *offset) } #endif - pte = pte_offset_map(pmd, vaddr); + pte = pte_offset_kernel(pmd, vaddr); if (!pte_present(*pte)) return NULL; @@ -218,7 +218,7 @@ xpmem_vaddr_to_pte_size(struct mm_struct *mm, u64 vaddr, u64 *size) return NULL; } - pte = pte_offset_map(pmd, vaddr); + pte = pte_offset_kernel(pmd, vaddr); if (!pte_present(*pte)) { *size = PAGE_SIZE; return NULL;