Messages in this thread Patch in this message | | | Date | Wed, 14 Oct 1998 21:19:25 +0200 (EEST) | From | "Krzysztof G. Baranowski" <> | Subject | Re: cdu31a.c |
| |
On Tue, 13 Oct 1998, Robert Boermans wrote: > I need this small patch to be able to read raw audio from my cdrom drive > without it it tries to use the value in ra before the copy to ra, which > can't be right. Yep, you're right. You could also get rid of verify_area(), as copy_from_user() already calls access_ok(). Could you test the patch below ? (against .125)
Kris -- Krzysztof G. Baranowski - President of the Harmless Manyacs' Club "Smith & Wesson - The original point and click interface..." http://www.knm.org.pl/ <prezes@manjak.knm.org.pl>
--- linux-2.1/drivers/cdrom/cdu31a.c~ Wed Oct 14 21:13:22 1998 +++ linux/drivers/cdrom/cdu31a.c Wed Oct 14 21:13:59 1998 @@ -3022,16 +3022,13 @@ { return -EIO; } - + + copy_from_user(&ra, (char *) arg, sizeof(ra)); + if (ra.nframes == 0) { return 0; } - - i=verify_area(VERIFY_WRITE, ra.buf, CD_FRAMESIZE_RAW * ra.nframes); - if(i<0) - return i; - copy_from_user(&ra, (char *) arg, sizeof(ra)); if (ra.addr_format == CDROM_LBA) {
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |