lkml.org 
[lkml]   [2001]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix a bug in ioctl(CDROMREADAUDIO) in cdrom.c in 2.2
Pierre Etchemaite wrote:
>
> Le 14-Mar-2001, Jani Jaakkola écrivait :
> >
> > Using ioctl(CDROMREADAUDIO) with nframes argument being larger than 8 and
> > not divisible by 8 causes kernel to read and return more audio data than
> > was requested. This is bad since it clobbers up processes memory
> > (I noticed this when my patched cdparanoia segfaulted).
>
> Same thing for 2.4.2.
>
> Is my allocation loop "over engineering", or just plain bad thing to do ?
>

I've been running this (or close: my version tries 8 frames, then jumps
immediately to 1, without trying 4 and 2 in between if the kmalloc
fails) since it was changed. Without such a patch, my CDDA read speed
drops to 25% the original rate. You also have the fix that started the
thread!

Jens (cdrom maintainer) said he was working on a more elegant solution,
but to me, such a simple fix as yours should go in the kernel in the
meantime. Jens?

--
David Mansfield (718) 963-2020
david@ultramaster.com
Ultramaster Group, LLC www.ultramaster.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.562 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site