Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Lock is already taken when handling async eve...
details: https://anonhg.NetBSD.org/src/rev/ad2c95847887
branches: trunk
changeset: 349054:ad2c95847887
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Mon Nov 21 21:03:22 2016 +0000
description:
Lock is already taken when handling async events, don't lock again
in scsipi_lookup_periph.
Fixes PR kern/51641.
diffstat:
sys/dev/scsipi/scsipi_base.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 145afffee981 -r ad2c95847887 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c Mon Nov 21 20:43:25 2016 +0000
+++ b/sys/dev/scsipi/scsipi_base.c Mon Nov 21 21:03:22 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.167 2016/11/20 15:37:19 mlelstv Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.168 2016/11/21 21:03:22 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.167 2016/11/20 15:37:19 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.168 2016/11/21 21:03:22 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_scsi.h"
@@ -2277,7 +2277,7 @@
/* XXX This could really suck with a large LUN space. */
for (; minlun <= maxlun; minlun++) {
- periph = scsipi_lookup_periph(chan, mo->mo_target, minlun);
+ periph = scsipi_lookup_periph_locked(chan, mo->mo_target, minlun);
if (periph == NULL)
continue;
@@ -2373,7 +2373,7 @@
if (target == chan->chan_id)
continue;
for (lun = 0; lun < chan->chan_nluns; lun++) {
- periph = scsipi_lookup_periph(chan, target, lun);
+ periph = scsipi_lookup_periph_locked(chan, target, lun);
if (periph) {
xs = periph->periph_xscheck;
if (xs)
Home |
Main Index |
Thread Index |
Old Index