On Thu, Feb 05, 2015 at 10:29:42AM -0500, Alan Stern wrote:
> On Wed, 4 Feb 2015, Al Viro wrote:
>
> > > > Um... readv() is also going through ->aio_read().
> > >
> > > Why does readv() do this but not read()? Wouldn't it make more sense
> > > to have all the read* calls use the same internal interface?
> >
> > Because there are two partially overlapping classes wrt vector IO semantics:
> ...
>
> Thanks for the detailed explanation. It appears to boil down to a
> series of historical accidents.
>
> In any case, feel free to copy the non-isochronous behavior of the
> synchronous routines in the async routines. It certainly won't hurt
> anything.
OK, I've limited it to sync ones, actually. Preliminary series in followups.
Those who prefer to read in git, see
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #gadget
WARNING: completely untested
Al Viro (6):
new helper: dup_iter()
gadget/function/f_fs.c: close leaks
gadget/function/f_fs.c: use put iov_iter into io_data
gadget/function/f_fs.c: switch to ->{read,write}_iter()
gadgetfs: use-after-free in ->aio_read()
gadget: switch ep_io_operations to ->read_iter/->write_iter
drivers/usb/gadget/function/f_fs.c | 204 +++++++++-------------
drivers/usb/gadget/legacy/inode.c | 346 +++++++++++++++----------------------
include/linux/uio.h | 2 +
mm/iov_iter.c | 15 ++
4 files changed, 237 insertions(+), 330 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html