summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-09-23 20:14:15 +0000
committerkib <kib@FreeBSD.org>2013-09-23 20:14:15 +0000
commit776b37339a65f1d3c5e391cfb0a70be9e7754a18 (patch)
tree950f8efdf202bec95c5c0c72a8f8695a3d85e13d
parent0f8f840670a0d35203600fb99b86013beb6c00eb (diff)
downloadFreeBSD-src-776b37339a65f1d3c5e391cfb0a70be9e7754a18.zip
FreeBSD-src-776b37339a65f1d3c5e391cfb0a70be9e7754a18.tar.gz
Free both KVA and backing pages when freeing TSS memory.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (marius)
-rw-r--r--sys/amd64/amd64/vm_machdep.c2
-rw-r--r--sys/i386/i386/vm_machdep.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 7253fe2..b7c2b67 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -341,7 +341,7 @@ cpu_thread_clean(struct thread *td)
* Clean TSS/iomap
*/
if (pcb->pcb_tssp != NULL) {
- kva_free((vm_offset_t)pcb->pcb_tssp,
+ kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_tssp,
ctob(IOPAGES + 1));
pcb->pcb_tssp = NULL;
}
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 17c29fd..a82f3f1 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -367,7 +367,7 @@ cpu_thread_clean(struct thread *td)
* XXX do we need to move the TSS off the allocated pages
* before freeing them? (not done here)
*/
- kva_free((vm_offset_t)pcb->pcb_ext,
+ kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_ext,
ctob(IOPAGES + 1));
pcb->pcb_ext = NULL;
}
OpenPOWER on IntegriCloud