diff options
author | 2020-07-23 18:51:24 +0000 | |
---|---|---|
committer | 2020-07-23 18:51:24 +0000 | |
commit | f75b961e00000bd5ad7073e7dd6657a06a01708e (patch) | |
tree | 904f70779b1ce4887b5b80a1130c5282de96e04c /sys | |
parent | document PEM_X509_INFO_read(3) and PEM_X509_INFO_read_bio(3) (diff) | |
download | wireguard-openbsd-f75b961e00000bd5ad7073e7dd6657a06a01708e.tar.xz wireguard-openbsd-f75b961e00000bd5ad7073e7dd6657a06a01708e.zip |
Free SLB descriptors when we destroy a pmap.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/powerpc64/powerpc64/pmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/powerpc64/powerpc64/pmap.c b/sys/arch/powerpc64/powerpc64/pmap.c index 9a588def095..a9e02ff9a11 100644 --- a/sys/arch/powerpc64/powerpc64/pmap.c +++ b/sys/arch/powerpc64/powerpc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.36 2020/07/23 15:09:09 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.37 2020/07/23 18:51:24 kettenis Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -910,7 +910,7 @@ pmap_vp_destroy(pmap_t pm) struct pte_desc *pted; int i, j; - LIST_FOREACH(slbd, &pm->pm_slbd, slbd_list) { + while ((slbd = LIST_FIRST(&pm->pm_slbd))) { vp1 = slbd->slbd_vp; if (vp1 == NULL) continue; @@ -933,9 +933,11 @@ pmap_vp_destroy(pmap_t pm) } slbd->slbd_vp = NULL; pool_put(&pmap_vp_pool, vp1); - } - /* XXX Free SLB descriptors. */ + LIST_REMOVE(slbd, slbd_list); + pool_put(&pmap_slbd_pool, slbd); + /* XXX Free VSID. */ + } } void |