mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/2] USB: Fixes for handling ITER_UBUF
@ 2023-04-01  6:05 Sandeep Dhavale
  2023-04-01  6:05 ` [PATCH v1 1/2] usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF Sandeep Dhavale
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sandeep Dhavale @ 2023-04-01  6:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Keith Busch, Jens Axboe
  Cc: Sandeep Dhavale, kernel-team, linux-usb, linux-kernel

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(-)

-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-01 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-01  6:05 [PATCH v1 0/2] USB: Fixes for handling ITER_UBUF Sandeep Dhavale
2023-04-01  6:05 ` [PATCH v1 1/2] usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF Sandeep Dhavale
2023-04-01  6:05 ` [PATCH v1 2/2] usb: gadgetfs: Fix ep_read_iter " Sandeep Dhavale
2023-04-01 16:08 ` [PATCH v1 0/2] USB: Fixes for handling ITER_UBUF Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®