Skip to content
Commit d356b3cd authored by Sandeep Dhavale's avatar Sandeep Dhavale Committed by Greg Kroah-Hartman
Browse files

usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF



iov_iter for ffs_epfile_read_iter can be ITER_UBUF with io_uring.
In that case dup_iter() does not have to allocate anything and it
can return NULL. ffs_epfile_read_iter treats this as a failure and
returns -ENOMEM. Fix it by checking if iter_is_ubuf().

Fixes: 1e23db45 ("io_uring: use iter_ubuf for single range imports")
Signed-off-by: default avatarSandeep Dhavale <dhavale@google.com>
Acked-by: default avatarJens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20230401060509.3608259-2-dhavale@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eddebe39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment