From 67ab91152965501cd4a7d57e7a80ee369d8af54c Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 17 Oct 2003 19:56:18 +0000 Subject: [PATCH] Add a KASSERT() to verify the pcb is not NULL. --- sys/arch/powerpc/powerpc/trap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index 1f000af41882..b23a80ce0f11 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.90 2003/10/08 00:28:42 thorpej Exp $ */ +/* $NetBSD: trap.c,v 1.91 2003/10/17 19:56:18 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.90 2003/10/08 00:28:42 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.91 2003/10/17 19:56:18 matt Exp $"); #include "opt_altivec.h" #include "opt_ddb.h" @@ -487,6 +487,7 @@ setusr(vaddr_t uva, size_t *len_p) { struct pcb *pcb = curpcb; vaddr_t p; + KASSERT(pcb != NULL); KASSERT(pcb->pcb_kmapsr == 0); pcb->pcb_kmapsr = USER_SR; pcb->pcb_umapsr = uva >> ADDR_SR_SHFT;