svn commit: r358670 - head/sys/powerpc/powerpc
Alfredo Dal'Ava Junior
alfredo at FreeBSD.org
Thu Mar 5 12:24:49 UTC 2020
Author: alfredo
Date: Thu Mar 5 12:24:48 2020
New Revision: 358670
URL: https://svnweb.freebsd.org/changeset/base/358670
Log:
[PowerPC64] fix uma_small_free panic
Fix panic "Freeing UMA block at 0xn with no associated page".
Also replaces pmap_remove call by pmap_kremove, for symmetry.
Reviewed by: jhibbits
Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D23931
Modified:
head/sys/powerpc/powerpc/uma_machdep.c
Modified: head/sys/powerpc/powerpc/uma_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/uma_machdep.c Thu Mar 5 10:52:16 2020 (r358669)
+++ head/sys/powerpc/powerpc/uma_machdep.c Thu Mar 5 12:24:48 2020 (r358670)
@@ -95,14 +95,13 @@ uma_small_free(void *mem, vm_size_t size, u_int8_t fla
{
vm_page_t m;
- if (!hw_direct_map)
- pmap_remove(kernel_pmap,(vm_offset_t)mem,
- (vm_offset_t)mem + PAGE_SIZE);
-
if (hw_direct_map)
m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem));
- else
- m = PHYS_TO_VM_PAGE((vm_offset_t)mem);
+ else {
+ m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)mem));
+ pmap_kremove((vm_offset_t)mem);
+ }
+
KASSERT(m != NULL,
("Freeing UMA block at %p with no associated page", mem));
#ifdef __powerpc64__
More information about the svn-src-head
mailing list