summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_cd.c
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2012-09-19 18:42:31 +0000
committertijl <tijl@FreeBSD.org>2012-09-19 18:42:31 +0000
commitbe53f707afe2e1ab0bc89deffe7a76ab361979c3 (patch)
treeaad3ead05b559ef75580999b594102597a9f43d8 /sys/cam/scsi/scsi_cd.c
parent1991e08ef172b50ad0a05784506936ea04c01688 (diff)
downloadFreeBSD-src-be53f707afe2e1ab0bc89deffe7a76ab361979c3.zip
FreeBSD-src-be53f707afe2e1ab0bc89deffe7a76ab361979c3.tar.gz
Fix a panic when trying to play invalid audio tracks.
Diffstat (limited to 'sys/cam/scsi/scsi_cd.c')
-rw-r--r--sys/cam/scsi/scsi_cd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index c102c60..def7323 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -2080,6 +2080,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td)
|| (st > (softc->toc.header.ending_track -
softc->toc.header.starting_track))) {
error = EINVAL;
+ cam_periph_unlock(periph);
break;
}
sentry = &softc->toc.entries[st].addr;
OpenPOWER on IntegriCloud