Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/ibm4xx Fix NULL dereference; "pap" argument...
details: https://anonhg.NetBSD.org/src/rev/6f3ed88d07d2
branches: trunk
changeset: 1007448:6f3ed88d07d2
user: rin <rin%NetBSD.org@localhost>
date: Thu Feb 20 05:13:16 2020 +0000
description:
Fix NULL dereference; "pap" argument of pmap_extract(9) can be NULL.
diffstat:
sys/arch/powerpc/ibm4xx/pmap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 08e5a47d6c39 -r 6f3ed88d07d2 sys/arch/powerpc/ibm4xx/pmap.c
--- a/sys/arch/powerpc/ibm4xx/pmap.c Thu Feb 20 05:10:01 2020 +0000
+++ b/sys/arch/powerpc/ibm4xx/pmap.c Thu Feb 20 05:13:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.76 2016/12/24 19:02:16 cherry Exp $ */
+/* $NetBSD: pmap.c,v 1.77 2020/02/20 05:13:16 rin Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.76 2016/12/24 19:02:16 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.77 2020/02/20 05:13:16 rin Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -1021,7 +1021,7 @@
int s;
s = splvm();
- if (pm->pm_ptbl[seg] && (pa = pm->pm_ptbl[seg][ptn])) {
+ if (pm->pm_ptbl[seg] && (pa = pm->pm_ptbl[seg][ptn]) && pap) {
*pap = TTE_PA(pa) | (va & PGOFSET);
}
splx(s);
Home |
Main Index |
Thread Index |
Old Index