diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-05-30 10:56:25 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-05-30 10:56:25 +0000 |
commit | 33a62270a65b195d9417c549f1a8ec734272f995 (patch) | |
tree | 17e0f1db51ddc5ba6bf605896f41fec859fdd761 /sys/arch/i386 | |
parent | 9888f283f5d55c3710c422ad00f52217d26cf2f4 (diff) |
Ensure pmap_create() waits in case kernel virtual space shortage.
Prevents a panic in pmap_pinit_pd_pae() when applying a lot of memory
pressure and the kernel needs time to recover while swapping.
Reported and fix tested by mvs@, also tested by sthen@
ok mlarkin@, mvs@, kettenis@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/pmapae.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c index 37e77ecbc3b..c88ec8ffebb 100644 --- a/sys/arch/i386/i386/pmapae.c +++ b/sys/arch/i386/i386/pmapae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmapae.c,v 1.71 2023/05/30 08:30:01 jsg Exp $ */ +/* $OpenBSD: pmapae.c,v 1.72 2024/05/30 10:56:24 mpi Exp $ */ /* * Copyright (c) 2006-2008 Michael Shalayeff @@ -990,7 +990,7 @@ pmap_pinit_pd_pae(struct pmap *pmap) if (cpu_meltdown) { int i; - va = (vaddr_t)km_alloc(4 * NBPG, &kv_any, &kp_zero, &kd_nowait); + va = (vaddr_t)km_alloc(4 * NBPG, &kv_any, &kp_zero, &kd_waitok); if (va == 0) panic("%s: kernel_map out of virtual space!", __func__); if (!pmap_extract(pmap_kernel(), |