summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2008-02-20 19:49:46 +0000
committerscottl <scottl@FreeBSD.org>2008-02-20 19:49:46 +0000
commite6487e006342a3b9ceff544939428eccf26d6601 (patch)
tree82aa0e6ba277b5cce94db379545382df41c19d18 /sys/cam
parent0e22dfe12567e90f501a6b4a25088e2a768affdd (diff)
downloadFreeBSD-src-e6487e006342a3b9ceff544939428eccf26d6601.zip
FreeBSD-src-e6487e006342a3b9ceff544939428eccf26d6601.tar.gz
Fix a couple of locking mistakes in the ses_ioctl path.
Submitted by: Matt Jacob
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_ses.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c
index 0c3092b..4a155c2 100644
--- a/sys/cam/scsi/scsi_ses.c
+++ b/sys/cam/scsi/scsi_ses.c
@@ -516,7 +516,7 @@ sesioctl(struct cdev *dev, u_long cmd, caddr_t arg_addr, int flag, struct thread
cam_periph_unlock(periph);
return (ENXIO);
}
- cam_periph_lock(periph);
+ cam_periph_unlock(periph);
error = 0;
@@ -555,14 +555,14 @@ sesioctl(struct cdev *dev, u_long cmd, caddr_t arg_addr, int flag, struct thread
obj.obj_id = i;
obj.subencid = ssc->ses_objmap[i].subenclosure;
obj.object_type = ssc->ses_objmap[i].enctype;
- cam_periph_lock(periph);
+ cam_periph_unlock(periph);
error = copyout(&obj, uobj, sizeof (ses_object));
cam_periph_lock(periph);
if (error) {
break;
}
}
- cam_periph_lock(periph);
+ cam_periph_unlock(periph);
break;
case SESIOC_GETENCSTAT:
OpenPOWER on IntegriCloud