check copy_from_user return value in sony535
PATCH 1/1 check copy_from_user return value in sony535
Hi Jens, Patch against 2.6.0-test6. - Check the return value of copy_from_user on sony535 CDROM driver.
Found by smatch.
Following the local style, btw :)
Please apply,
Thanks.
Felipe
drivers/cdrom/sonycd535.c renamed from drivers/cdrom/sonycd535.c.orig +2 -1
@@ -1158,7 +1158,8 @@return err;spin_up_drive (status);set_drive_mode (SONY535_AUDIO_DRIVE_MODE , status); -copy_from_user (params, (void *)arg,6 ); +if (copy_from_user (params, (void *)arg,6 )) +return -EFAULT ;/* The parameters are given in int, must be converted */ for (i =0 ; i <3 ; i++) {
Quoted 6 lines · Felipe W Damasio
Hi Jens, Patch against 2.6.0-test6. - Check the return value of copy_from_user on sony535 CDROM driver.Found by smatch.
Looks fine, thanks.
Quoted 1 line
Following the local style, btw :)
Appreciated :)
Signature · 1 line
Jens Axboe