Skip to content

USB: Fixes for handling ITER_UBUF

Sandeep Dhavale linux-usb lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUFdrivers/usb/gadget/function/f_fs.c+1 -10 replies
2/2usb: gadgetfs: Fix ep_read_iter to handle ITER_UBUFdrivers/usb/gadget/legacy/inode.c+1 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJens Axboe
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/2] USB: Fixes for handling ITER_UBUF

Since the commit 1e23db450cff ("io_uring: use iter_ubuf for single range imports") .read_iter() can be called with iov type ITER_UBUF. In such case dup_iter() will correctly dup but it will not allocate any memory. But callers ffs_epfile_read_iter and ep_read_iter treat this as a failure.

Following patches address this by checking if iter_is_ubuf(). Without the fix, async IOs from io_uring will be returned with -ENOMEM.

Sandeep Dhavale (2):
usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF
usb: gadgetfs: Fix ep_read_iter to handle ITER_UBUF

 drivers/usb/gadget/function/f_fs.c | 2 +-
 drivers/usb/gadget/legacy/inode.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.40.0.348.gf938b09366-goog