aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2008-02-20 19:49:46 +0000
committerScott Long <scottl@FreeBSD.org>2008-02-20 19:49:46 +0000
commitc9f892eb86abccaa8314ff070c23223ba38829bf (patch)
tree82aa0e6ba277b5cce94db379545382df41c19d18 /sys/cam
parent00620931e1f6716aecbf2959ce39cba71eeb3aff (diff)
downloadsrc-c9f892eb86abccaa8314ff070c23223ba38829bf.tar.gz
src-c9f892eb86abccaa8314ff070c23223ba38829bf.zip
Fix a couple of locking mistakes in the ses_ioctl path.
Submitted by: Matt Jacob
Notes
Notes: svn path=/head/; revision=176426
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 0c3092b7cf85..4a155c2d7894 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: