Module Name:    src
Committed By:   riz
Date:           Mon Apr  9 17:54:20 UTC 2012

Modified Files:
        src/sys/dev/scsipi [netbsd-6]: atapiconf.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #166):
        sys/dev/scsipi/atapiconf.c: revision 1.84
take the kernel lock during detach of atapibus as well.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.83.14.1 src/sys/dev/scsipi/atapiconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/scsipi/atapiconf.c
diff -u src/sys/dev/scsipi/atapiconf.c:1.83 src/sys/dev/scsipi/atapiconf.c:1.83.14.1
--- src/sys/dev/scsipi/atapiconf.c:1.83	Mon Jun  7 01:41:39 2010
+++ src/sys/dev/scsipi/atapiconf.c	Mon Apr  9 17:54:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atapiconf.c,v 1.83 2010/06/07 01:41:39 pgoyette Exp $	*/
+/*	$NetBSD: atapiconf.c,v 1.83.14.1 2012/04/09 17:54:20 riz Exp $	*/
 
 /*
  * Copyright (c) 1996, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atapiconf.c,v 1.83 2010/06/07 01:41:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atapiconf.c,v 1.83.14.1 2012/04/09 17:54:20 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,6 +171,9 @@ atapibuschilddet(device_t self, device_t
 	struct scsipi_periph *periph;
 	int target;
 
+	/* XXXSMP scsipi */
+	KERNEL_LOCK(1, curlwp);
+
 	for (target = 0; target < chan->chan_ntargets; target++) {
 		periph = scsipi_lookup_periph(chan, target, 0);
 		if (periph == NULL || periph->periph_dev != child)
@@ -179,6 +182,9 @@ atapibuschilddet(device_t self, device_t
 		free(periph, M_DEVBUF);
 		break;
 	}
+
+	/* XXXSMP scsipi */
+	KERNEL_UNLOCK_ONE(curlwp);
 }
 
 static int

Reply via email to