Module Name: src Committed By: reinoud Date: Mon Sep 5 18:50:35 UTC 2011
Modified Files: src/sys/arch/usermode/usermode: trap.c Log Message: Check for NULL pcb! To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/usermode/usermode/trap.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/usermode/usermode/trap.c diff -u src/sys/arch/usermode/usermode/trap.c:1.26 src/sys/arch/usermode/usermode/trap.c:1.27 --- src/sys/arch/usermode/usermode/trap.c:1.26 Mon Sep 5 12:04:40 2011 +++ src/sys/arch/usermode/usermode/trap.c Mon Sep 5 18:50:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.26 2011/09/05 12:04:40 reinoud Exp $ */ +/* $NetBSD: trap.c,v 1.27 2011/09/05 18:50:34 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk <rein...@netbsd.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.26 2011/09/05 12:04:40 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.27 2011/09/05 18:50:34 reinoud Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -174,6 +174,11 @@ if (!pmap_fault(vm_map->pmap, va, &atype)) { aprint_debug("pmap fault couldn't handle it! : " "derived atype %d\n", atype); + + /* extra debug for now */ + if (pcb == 0) + panic("NULL pcb!\n"); + pcb->pcb_onfault = NULL; rv = uvm_fault(vm_map, va, atype); pcb->pcb_onfault = onfault;