]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/x86: free_p2m_page: use memblock_free_ptr() to free a virtual pointer
authorMike Rapoport <rppt@linux.ibm.com>
Fri, 5 Nov 2021 20:43:10 +0000 (13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:07 +0000 (12:50 +0100)
commitd26e179d2cac186632bb3b297d19ecf94066ab1f
tree5ceb259a13090056981f03c6039a38b0e49fcf65
parent708ce479ff3c04327403217ba49cce84845c5d40
xen/x86: free_p2m_page: use memblock_free_ptr() to free a virtual pointer

[ Upstream commit c486514dd40980b2dbb0e15fabddfe1324ed0197 ]

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/20210930185031.18648-3-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Shahab Vahedi <Shahab.Vahedi@synopsys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stable-dep-of: 29091a52562b ("of: reserved-memory: Do not make kmemleak ignore freed address")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/xen/p2m.c