Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm #if DIAGNOSTIC panic ---> KASSERT
details: https://anonhg.NetBSD.org/src/rev/0dd75c61e17b
branches: trunk
changeset: 822426:0dd75c61e17b
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Mar 19 23:47:46 2017 +0000
description:
#if DIAGNOSTIC panic ---> KASSERT
diffstat:
sys/uvm/uvm_bio.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (39 lines):
diff -r 17c6596bccbd -r 0dd75c61e17b sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Sun Mar 19 23:44:34 2017 +0000
+++ b/sys/uvm/uvm_bio.c Sun Mar 19 23:47:46 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_bio.c,v 1.83 2015/05/27 19:43:40 rmind Exp $ */
+/* $NetBSD: uvm_bio.c,v 1.84 2017/03/19 23:47:46 riastradh Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.83 2015/05/27 19:43:40 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.84 2017/03/19 23:47:46 riastradh Exp $");
#include "opt_uvmhist.h"
#include "opt_ubc.h"
@@ -346,14 +346,14 @@
UVMHIST_LOG(ubchist, "va 0x%lx ubc_offset 0x%lx access_type %d",
va, ubc_offset, access_type, 0);
-#ifdef DIAGNOSTIC
if ((access_type & VM_PROT_WRITE) != 0) {
- if (slot_offset < trunc_page(umap->writeoff) ||
- umap->writeoff + umap->writelen <= slot_offset) {
- panic("ubc_fault: out of range write");
- }
+ KASSERTMSG((trunc_page(umap->writeoff) <= slot_offset),
+ "out of range write: slot=0x%lx off=0x%lx",
+ slot_offset, umap->writeoff);
+ KASSERTMSG((slot_offset < umap->writeoff + umap->writelen),
+ "out of range write: slot=0x%lx off=0x%lx len=0x%lx",
+ slot_offset, umap->writeoff, umap->writelen);
}
-#endif
/* no umap locking needed since we have a ref on the umap */
uobj = umap->uobj;
Home |
Main Index |
Thread Index |
Old Index