Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic It's hard to get a backtrace after calling a NULL...
details: https://anonhg.NetBSD.org/src/rev/2d1805cbd3a1
branches: trunk
changeset: 768270:2d1805cbd3a1
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Aug 13 16:02:48 2011 +0000
description:
It's hard to get a backtrace after calling a NULL function pointer,
add KASSERT before calling.
diffstat:
sys/dev/ic/wdc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 5690ceb029c3 -r 2d1805cbd3a1 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c Sat Aug 13 15:38:47 2011 +0000
+++ b/sys/dev/ic/wdc.c Sat Aug 13 16:02:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.261 2010/03/28 20:46:18 snj Exp $ */
+/* $NetBSD: wdc.c,v 1.262 2011/08/13 16:02:48 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.261 2010/03/28 20:46:18 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.262 2011/08/13 16:02:48 jakllsch Exp $");
#include "opt_ata.h"
@@ -880,6 +880,7 @@
}
#endif
chp->ch_flags &= ~ATACH_IRQ_WAIT;
+ KASSERT(xfer->c_intr != NULL);
ret = xfer->c_intr(chp, xfer, 1);
if (ret == 0) /* irq was not for us, still waiting for irq */
chp->ch_flags |= ATACH_IRQ_WAIT;
@@ -1332,6 +1333,7 @@
callout_reset(&chp->ch_callout, hz, wdctimeout, chp);
xfer->c_flags |= C_TIMEOU;
chp->ch_flags &= ~ATACH_IRQ_WAIT;
+ KASSERT(xfer->c_intr != NULL);
xfer->c_intr(chp, xfer, 1);
} else
__wdcerror(chp, "missing untimeout");
Home |
Main Index |
Thread Index |
Old Index