RE: [PATCH] usb: gadget: f_fs: report error if excess data received

From: Du, Changbin
Date: Thu May 12 2016 - 00:25:20 EST


> On Wed, May 11 2016, Felipe Balbi wrote:
> > Also, returning -EOVERFLOW is not exactly correct here, because you'd
> > violate POSIX specification of read(), right ?
>
> Maybe we could piggyback on:
>
> EINVAL fd was created via a call to timerfd_create(2) and the
> wrong size buffer was given to read();
>
> But I kinda agree. Iâm not sure how much we need to care about this
> instead of having user space round their buffers up to the nearest max
> packet size boundary.
>
> --
> Best regards
> ããã âðððð86â ãããããã
> ÂIf at first you donât succeed, give up skydivingÂ

This is a good idea that "having user space round their buffers". But kernel
Still cannot hide error silently. :)