diff options
| author | chs <chs@NetBSD.org> | 2012-04-06 17:12:45 +0000 |
|---|---|---|
| committer | chs <chs@NetBSD.org> | 2012-04-06 17:12:45 +0000 |
| commit | d09eb9a7851bbf636c4fa08028e8d0a62e1a121c (patch) | |
| tree | b937091d3a266e95fc097b733bb1d381936819f8 /sys/dev | |
| parent | f1313ab4ea5621d081a4fa914d8251db420dc35f (diff) | |
take the kernel lock during detach of atapibus as well.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/scsipi/atapiconf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/scsipi/atapiconf.c b/sys/dev/scsipi/atapiconf.c index 1481e29901d..37c19f4fa27 100644 --- a/sys/dev/scsipi/atapiconf.c +++ b/sys/dev/scsipi/atapiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: atapiconf.c,v 1.83 2010/06/07 01:41:39 pgoyette Exp $ */ +/* $NetBSD: atapiconf.c,v 1.84 2012/04/06 17:12:45 chs 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.84 2012/04/06 17:12:45 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -171,6 +171,9 @@ atapibuschilddet(device_t self, device_t child) 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 child) free(periph, M_DEVBUF); break; } + + /* XXXSMP scsipi */ + KERNEL_UNLOCK_ONE(curlwp); } static int |
