> -
> +
> + 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));
But you should really check the return value of copy_from_user...
Better use something like this:
if (copy_from_user(&ra, (char *) arg, sizeof(ra)))
return -EFAULT;
-Andi
-
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/