diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -9490,6 +9490,8 @@ pa = 0; val = 0; pdpe = pmap_pdpe(pmap, addr); + if (pdpe == NULL) + goto out; if ((*pdpe & PG_V) != 0) { if ((*pdpe & PG_PS) != 0) { pte = *pdpe; @@ -9525,6 +9527,7 @@ (pte & (PG_MANAGED | PG_V)) == (PG_MANAGED | PG_V)) { *pap = pa; } +out: PMAP_UNLOCK(pmap); return (val); }