Re: [PATCH, RFC] usb devio: Use get_user() instead of __get_user()

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

 



On Wed, Jul 29, 2009 at 11:05:28AM +0200, Michael Buesch wrote:
> On Wednesday 29 July 2009 03:57:54 Pete Zaitcev wrote:
> > On Sun, 19 Jul 2009 23:24:20 -0700, Greg KH <gregkh@xxxxxxx> wrote:
> > 
> > > Pete would know best, as he added this code way back in 2005 in commit
> > > c36fc889.
> > 
> > This may be an instance of cargo cult programming on my part
> > or just a thinko.
> > 
> > > Pete, any thoughts on the patch below?
> > 
> > > > +++ linux-2.6/drivers/usb/core/devio.c
> > > > @@ -1531,21 +1531,21 @@ static int proc_ioctl_default(struct dev
> > 
> > > >  	uioc = compat_ptr((long)arg);
> > > >  	if (get_user(ctrl.ifno, &uioc->ifno) ||
> > > >  	    get_user(ctrl.ioctl_code, &uioc->ioctl_code) ||
> > > > -	    __get_user(udata, &uioc->data))
> > > > +	    get_user(udata, &uioc->data))
> > > >  		return -EFAULT;
> > > >  	ctrl.data = compat_ptr(udata);
> > 
> > I don't see why not.
> > 
> > -- Pete
> > 
> > 
> 
> Ok, the same applies to the get_urb32 function then, right? Should I send a patch
> to change both functions?

Probably, yes.

thanks,

greg k-h
--
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