]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] CDROMREADAUDIO frames
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:50:19 +0000 (18:50 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:50:19 +0000 (18:50 -0800)
From: Jens Axboe <axboe@suse.de>

2.6 imposes a 64 frame limit where 2.4 does not (just relies on kmalloc()
failing and limiting frames from that).  That breaks at least on guys app.
With MSF adressing, it's much simpler to be able to ask for a full second
at the time, so I think we should just allow that.  So bump the limit from
64 to CD_FRAMES (which is 75).

drivers/cdrom/cdrom.c

index bcad7f2456183622670931c4d3199446a8c55365..5f4ad2bacd7665f8d97a2dbeb6fd906b512b3583 100644 (file)
@@ -2294,7 +2294,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
                        return -EINVAL;
 
                /* FIXME: we need upper bound checking, too!! */
-               if (lba < 0 || ra.nframes <= 0 || ra.nframes > 64)
+               if (lba < 0 || ra.nframes <= 0 || ra.nframes > CD_FRAMES)
                        return -EINVAL;
 
                /*