Module Name:    src
Committed By:   maxv
Date:           Mon Feb 18 19:03:12 UTC 2019

Modified Files:
        src/sys/arch/x86/x86: pmap.c

Log Message:
Fix stupid mistake, I didn't reflect correctly the behavior of pmap_sync_pv
in the EPT callback, 'optep' can be NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.323 src/sys/arch/x86/x86/pmap.c:1.324
--- src/sys/arch/x86/x86/pmap.c:1.323	Thu Feb 14 08:18:25 2019
+++ src/sys/arch/x86/x86/pmap.c	Mon Feb 18 19:03:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.323 2019/02/14 08:18:25 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.324 2019/02/18 19:03:12 maxv Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.323 2019/02/14 08:18:25 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.324 2019/02/18 19:03:12 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -5557,7 +5557,8 @@ pmap_ept_sync_pv(struct vm_page *ptp, va
 	pmap_unmap_pte();
 
 	*oattrs = pmap_ept_to_pp_attrs(opte);
-	*optep = opte;
+	if (optep != NULL)
+		*optep = opte;
 	return 0;
 }
 

Reply via email to