Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata Add some additional consistency checking paranoi...
details: https://anonhg.NetBSD.org/src/rev/5e7a4873bc52
branches: trunk
changeset: 767774:5e7a4873bc52
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Jul 30 04:42:03 2011 +0000
description:
Add some additional consistency checking paranoia with KASSERT.
diffstat:
sys/dev/ata/wd.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r d66f41728921 -r 5e7a4873bc52 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Sat Jul 30 04:34:17 2011 +0000
+++ b/sys/dev/ata/wd.c Sat Jul 30 04:42:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.386 2011/02/10 05:07:46 enami Exp $ */
+/* $NetBSD: wd.c,v 1.387 2011/07/30 04:42:03 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.386 2011/02/10 05:07:46 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.387 2011/07/30 04:42:03 jakllsch Exp $");
#include "opt_ata.h"
@@ -703,6 +703,7 @@
wd->sc_wdc_bio.bcount = bp->b_bcount;
wd->sc_wdc_bio.databuf = bp->b_data;
wd->sc_wdc_bio.blkdone =0;
+ KASSERT(bp == wd->sc_bp || wd->sc_bp == NULL);
wd->sc_bp = bp;
/*
* If we're retrying, retry in single-sector mode. This will give us
@@ -829,6 +830,8 @@
biodone(bp);
wd->openings++;
}
+ KASSERT(wd->sc_bp != NULL);
+ wd->sc_bp = NULL;
wdstart(wd);
}
Home |
Main Index |
Thread Index |
Old Index