summaryrefslogtreecommitdiffstats
path: root/sys/dev/mfi/mfi_pci.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-08-13 21:14:16 +0000
committerjhb <jhb@FreeBSD.org>2007-08-13 21:14:16 +0000
commit729445db78b576febeacaffe13ab750da580c2b8 (patch)
tree55547c26582b25fecc51d2d0d7dfedd403991224 /sys/dev/mfi/mfi_pci.c
parentda9c015b527e4b42873e708244f9c5d05aa9631d (diff)
downloadFreeBSD-src-729445db78b576febeacaffe13ab750da580c2b8.zip
FreeBSD-src-729445db78b576febeacaffe13ab750da580c2b8.tar.gz
Fix a few nits relative to the previous changes:
- Don't leak the config lock if detach() fails due to the controller char dev being open. - Close a race between detach() and a process opening the controller char dev. MFC after: 1 week Approved by: re (bmah)
Diffstat (limited to 'sys/dev/mfi/mfi_pci.c')
-rw-r--r--sys/dev/mfi/mfi_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c
index a335bd2..45e8311 100644
--- a/sys/dev/mfi/mfi_pci.c
+++ b/sys/dev/mfi/mfi_pci.c
@@ -204,6 +204,7 @@ mfi_pci_detach(device_t dev)
mtx_lock(&sc->mfi_io_lock);
if ((sc->mfi_flags & MFI_FLAGS_OPEN) != 0) {
mtx_unlock(&sc->mfi_io_lock);
+ sx_xunlock(&sc->mfi_config_lock);
return (EBUSY);
}
sc->mfi_detaching = 1;
OpenPOWER on IntegriCloud