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 overflow.

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

2014-03-03 Thread Liu, Chuansheng
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 the return length ret the user space requested len

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 chuansheng@intel.com 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.

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 chuansheng@intel.com 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

[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