From fed22617a21d2f8c70496ae84e9b67990a2a5020 Mon Sep 17 00:00:00 2001 From: ad Date: Tue, 7 Jan 2020 13:48:01 +0000 Subject: [PATCH] Correction to previous. --- sys/arch/xen/x86/xen_pmap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/arch/xen/x86/xen_pmap.c b/sys/arch/xen/x86/xen_pmap.c index 59a0e96a2043..eff4896b345d 100644 --- a/sys/arch/xen/x86/xen_pmap.c +++ b/sys/arch/xen/x86/xen_pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: xen_pmap.c,v 1.36 2020/01/07 13:20:18 ad Exp $ */ +/* $NetBSD: xen_pmap.c,v 1.37 2020/01/07 13:48:01 ad Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -101,7 +101,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.36 2020/01/07 13:20:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.37 2020/01/07 13:48:01 ad Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -220,7 +220,9 @@ pmap_extract_ma(struct pmap *pmap, vaddr_t va, paddr_t *pap) pmap_map_ptes(pmap, &pmap2, &ptes, &pdes); if (!pmap_pdes_valid(va, pdes, &pde, &lvl)) { pmap_unmap_ptes(pmap, pmap2); - mutex_exit(&pmap->pm_lock); + if (pmap != pmap_kernel()) { + mutex_exit(&pmap->pm_lock); + } return false; }