Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/scsipi Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/18ed88c99d02
branches: netbsd-6
changeset: 774146:18ed88c99d02
user: riz <riz%NetBSD.org@localhost>
date: Tue May 22 18:46:09 2012 +0000
description:
Pull up following revision(s) (requested by jakllsch in ticket #277):
sys/dev/scsipi/scsiconf.c: revision 1.268
Fix locking issue triggered by drvctr -r of a scsibus(4).
Pullup to netbsd-6 should be requested.
diffstat:
sys/dev/scsipi/scsiconf.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r 0d3e8b4177c4 -r 18ed88c99d02 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Tue May 22 18:44:46 2012 +0000
+++ b/sys/dev/scsipi/scsiconf.c Tue May 22 18:46:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.262.10.2 2012/04/23 16:28:30 riz Exp $ */
+/* $NetBSD: scsiconf.c,v 1.262.10.3 2012/05/22 18:46:09 riz Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.10.2 2012/04/23 16:28:30 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.10.3 2012/05/22 18:46:09 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -340,6 +340,9 @@
int maxtarget, mintarget, maxlun, minlun;
int error;
+ /* XXXSMP scsipi */
+ KERNEL_LOCK(1, curlwp);
+
if (target == -1) {
maxtarget = chan->chan_ntargets - 1;
mintarget = 0;
@@ -367,7 +370,7 @@
0, curproc);
if ((error = scsipi_adapter_addref(chan->chan_adapter)) != 0)
- return (error);
+ goto ret;
for (target = mintarget; target <= maxtarget; target++) {
if (target == chan->chan_id)
continue;
@@ -388,7 +391,9 @@
scsipi_set_xfer_mode(chan, target, 1);
}
scsipi_adapter_delref(chan->chan_adapter);
- return (0);
+ret:
+ KERNEL_UNLOCK_ONE(curlwp);
+ return (error);
}
static int
Home |
Main Index |
Thread Index |
Old Index