Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi Add a DEBUG assert for the problem noted in P...



details:   https://anonhg.NetBSD.org/src/rev/deefb8589a90
branches:  trunk
changeset: 822017:deefb8589a90
user:      maya <maya%NetBSD.org@localhost>
date:      Sun Feb 26 10:58:47 2017 +0000

description:
Add a DEBUG assert for the problem noted in PR kern/51731
of some drivers not sufficiently locking.

The relevant drivers might not work, but if someone gets around to them
then the problem could be visible.

sd doesn't trip the assert.

diffstat:

 sys/dev/scsipi/scsipi_base.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 4c15415163ba -r deefb8589a90 sys/dev/scsipi/scsipi_base.h
--- a/sys/dev/scsipi/scsipi_base.h      Sun Feb 26 10:49:25 2017 +0000
+++ b/sys/dev/scsipi/scsipi_base.h      Sun Feb 26 10:58:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.h,v 1.23 2016/11/20 15:37:19 mlelstv Exp $ */
+/*     $NetBSD: scsipi_base.h,v 1.24 2017/02/26 10:58:47 maya Exp $    */
 
 /*-
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -96,6 +96,7 @@
     struct buf *bp, int flags)
 {
 
+       KDASSERT(mutex_owned(chan_mtx(periph->periph_channel)));
        return scsipi_make_xs_internal(periph, cmd, cmdlen, data_addr,
            datalen, retries, timeout, bp, flags | XS_CTL_NOSLEEP);
 }



Home | Main Index | Thread Index | Old Index