Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev add KASSERT() just before setting sc_deferred, to en...
details: https://anonhg.NetBSD.org/src/rev/847fc1db4ebf
branches: trunk
changeset: 357945:847fc1db4ebf
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Dec 04 22:15:52 2017 +0000
description:
add KASSERT() just before setting sc_deferred, to ensure this does
not trigger problem in PR kern/52769
diffstat:
sys/dev/dksubr.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r acaa52008541 -r 847fc1db4ebf sys/dev/dksubr.c
--- a/sys/dev/dksubr.c Mon Dec 04 14:50:33 2017 +0000
+++ b/sys/dev/dksubr.c Mon Dec 04 22:15:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.100 2017/10/29 09:44:17 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.101 2017/12/04 22:15:52 jdolecek Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.100 2017/10/29 09:44:17 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.101 2017/12/04 22:15:52 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -422,6 +422,7 @@
error = dkd->d_diskstart(dksc->sc_dev, bp);
mutex_enter(&dksc->sc_iolock);
if (error == EAGAIN) {
+ KASSERT(dksc->sc_deferred == NULL);
dksc->sc_deferred = bp;
disk_unbusy(&dksc->sc_dkdev, 0, (bp->b_flags & B_READ));
disk_wait(&dksc->sc_dkdev);
Home |
Main Index |
Thread Index |
Old Index