RE: [PATCH] usb: gadget: return the right length in ffs_epfile_io()

2014-03-03 Thread Liu, Chuansheng
rg; Cohen, David A; > Zhuang, Jin Can; Wang, Yu Y > Subject: Re: [PATCH] usb: gadget: return the right length in ffs_epfile_io() > > Hi, > > On Thu, Feb 27, 2014 at 02:49:31PM +0800, Chuansheng Liu wrote: > > When the request length is aligned to maxpacketsize, sometimes > >

Re: [PATCH] usb: gadget: return the right length in ffs_epfile_io()

2014-03-03 Thread Felipe Balbi
Hi, On Thu, Feb 27, 2014 at 02:49:31PM +0800, Chuansheng Liu wrote: > When the request length is aligned to maxpacketsize, sometimes > the return length ret > the user space requested len. > > At that time, we will use min_t(size_t, ret, len) to limit the > size in case of user data buffer overfl

Re: [PATCH] usb: gadget: return the right length in ffs_epfile_io()

2014-02-27 Thread David Cohen
On Thu, Feb 27, 2014 at 01:15:25PM +0100, Michal Nazarewicz wrote: > On Thu, Feb 27 2014, Chuansheng Liu wrote: > > When the request length is aligned to maxpacketsize, sometimes > > the return length ret > the user space requested len. > > > > At that time, we will use min_t(size_t, ret, len) to

Re: [PATCH] usb: gadget: return the right length in ffs_epfile_io()

2014-02-27 Thread Michal Nazarewicz
On Thu, Feb 27 2014, Chuansheng Liu wrote: > When the request length is aligned to maxpacketsize, sometimes > the return length ret > the user space requested len. > > At that time, we will use min_t(size_t, ret, len) to limit the > size in case of user data buffer overflow. > > But we need return

[PATCH] usb: gadget: return the right length in ffs_epfile_io()

2014-02-26 Thread Chuansheng Liu
When the request length is aligned to maxpacketsize, sometimes the return length ret > the user space requested len. At that time, we will use min_t(size_t, ret, len) to limit the size in case of user data buffer overflow. But we need return the min_t(size_t, ret, len) to tell the user space righ