diff options
author | Sandeep Dhavale <dhavale@google.com> | 2023-04-01 09:05:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-05 20:24:01 +0300 |
commit | d356b3cdd00cae4508be566a47c0cfb74e14862a (patch) | |
tree | 0be5c4d8b57e163785c316e0a5d72eebbee29736 /block | |
parent | eddebe39602efe631b83ff8d03f26eba12cfd760 (diff) | |
download | linux-d356b3cdd00cae4508be566a47c0cfb74e14862a.tar.xz |
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: 1e23db450cff ("io_uring: use iter_ubuf for single range imports")
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20230401060509.3608259-2-dhavale@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions