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

From: David Cohen
Date: Thu Feb 27 2014 - 18:40:08 EST


On Thu, Feb 27, 2014 at 01:15:25PM +0100, Michal Nazarewicz wrote:
> On Thu, Feb 27 2014, Chuansheng Liu <chuansheng.liu@xxxxxxxxx> 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 the min_t(size_t, ret, len) to tell the user
> > space rightly also.
> >
> > Signed-off-by: Chuansheng Liu <chuansheng.liu@xxxxxxxxx>
>
> Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

Reviewed-by: David Cohen <david.a.cohen@xxxxxxxxxxxxxxx>

IMHO it makes sense to push this patch to 3.14-rc since it is an
extension of usb gadget's quick_ep_out_aligned_size merged on 3.14-rc1

Br, David Cohen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/