summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2006-07-14 13:58:32 +0000
committerdelphij <delphij@FreeBSD.org>2006-07-14 13:58:32 +0000
commit5a156f823ad80d199b01cf54ac31aee47f0a2ced (patch)
treee44d53c3730de5178f3b58c518d55193fa5e1de9 /sys/cam
parentb95e8729b4f663414ed1cb8d4526574c845ce192 (diff)
downloadFreeBSD-src-5a156f823ad80d199b01cf54ac31aee47f0a2ced.zip
FreeBSD-src-5a156f823ad80d199b01cf54ac31aee47f0a2ced.tar.gz
Drop Giant before returning in error path, thus eliminates
two mutex leaks. Submitted by: Beyond Luo <fedora ercist iscas ac cn> PR: kern/100046 Reviewed by: ken, scottl
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_cd.c1
-rw-r--r--sys/cam/scsi/scsi_da.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 8795fc5..a64d93e 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -591,6 +591,7 @@ cdsysctlinit(void *context, int pending)
if (softc->sysctl_tree == NULL) {
printf("cdsysctlinit: unable to allocate sysctl tree\n");
+ mtx_unlock(&Giant);
return;
}
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index bc16d8b..c097409 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1001,6 +1001,7 @@ dasysctlinit(void *context, int pending)
CTLFLAG_RD, 0, tmpstr);
if (softc->sysctl_tree == NULL) {
printf("dasysctlinit: unable to allocate sysctl tree\n");
+ mtx_unlock(&Giant);
return;
}
OpenPOWER on IntegriCloud