diff options
author | Mike Rapoport <[email protected]> | 2021-11-05 13:43:10 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-11-06 13:30:41 -0700 |
commit | c486514dd40980b2dbb0e15fabddfe1324ed0197 (patch) | |
tree | 502e8d0aaf5358123a7833e222511b805e442811 | |
parent | 5787ea5bed7607cbee26da492e574f94975e4d76 (diff) |
xen/x86: free_p2m_page: use memblock_free_ptr() to free a virtual pointer
free_p2m_page() wrongly passes a virtual pointer to memblock_free() that
treats it as a physical address.
Call memblock_free_ptr() instead that gets a virtual address to free the
memory.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Mike Rapoport <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: Shahab Vahedi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | arch/x86/xen/p2m.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 5e6e236977c7..141bb9dbd2fb 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -197,7 +197,7 @@ static void * __ref alloc_p2m_page(void) static void __ref free_p2m_page(void *p) { if (unlikely(!slab_is_available())) { - memblock_free((unsigned long)p, PAGE_SIZE); + memblock_free_ptr(p, PAGE_SIZE); return; } |