Re: [PATCH 02/10] USB: devio: Properly do access_ok() checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  7 Aug 2009 16:31:03 -0700, Greg Kroah-Hartman <gregkh@xxxxxxx> wrote:

> -	if (get_user(kurb->type, &uurb->type) ||
> +	if (!access_ok(VERIFY_READ, uurb, sizeof(*uurb)) ||
> +	    __get_user(kurb->type, &uurb->type) ||
>  	    __get_user(kurb->endpoint, &uurb->endpoint) ||

Oh totally, it's better than converting everything to get_user().
Silly me, I should've suggested this myself.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux