Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Pacify assertion in a failure path.



details:   https://anonhg.NetBSD.org/src/rev/69f3b4a95c42
branches:  trunk
changeset: 970274:69f3b4a95c42
user:      ad <ad%NetBSD.org@localhost>
date:      Wed Mar 18 18:54:28 2020 +0000

description:
Pacify assertion in a failure path.

Reported-by: syzbot+e666891e2bc5caee14d8%syzkaller.appspotmail.com@localhost

diffstat:

 sys/arch/x86/x86/pmap.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 855b84d59420 -r 69f3b4a95c42 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Wed Mar 18 13:56:48 2020 +0000
+++ b/sys/arch/x86/x86/pmap.c   Wed Mar 18 18:54:28 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.376 2020/03/17 22:38:14 ad Exp $    */
+/*     $NetBSD: pmap.c,v 1.377 2020/03/18 18:54:28 ad Exp $    */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.376 2020/03/17 22:38:14 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.377 2020/03/18 18:54:28 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -2450,6 +2450,7 @@
                        continue;
                }
                KASSERT(pt->pg[i]->wire_count == 0);
+               pt->pg[i]->wire_count = 1;
                PMAP_CHECK_PP(VM_PAGE_TO_PP(pt->pg[i]));
                pmap_freepage(pmap, pt->pg[i], i - 1);
        }



Home | Main Index | Thread Index | Old Index