From e6487e006342a3b9ceff544939428eccf26d6601 Mon Sep 17 00:00:00 2001 From: scottl Date: Wed, 20 Feb 2008 19:49:46 +0000 Subject: Fix a couple of locking mistakes in the ses_ioctl path. Submitted by: Matt Jacob --- sys/cam/scsi/scsi_ses.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/cam') 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: -- cgit v1.1