lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 032/593] [xarray] iov_iter_fault_in_readable() should do nothing in xarray case
    Date
    From: Al Viro <viro@zeniv.linux.org.uk>

    commit 0e8f0d67401589a141950856902c7d0ec8d9c985 upstream.

    ... and actually should just check it's given an iovec-backed iterator
    in the first place.

    Cc: stable@vger.kernel.org
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    lib/iov_iter.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/lib/iov_iter.c
    +++ b/lib/iov_iter.c
    @@ -434,7 +434,7 @@ int iov_iter_fault_in_readable(struct io
    int err;
    struct iovec v;

    - if (!(i->type & (ITER_BVEC|ITER_KVEC))) {
    + if (iter_is_iovec(i)) {
    iterate_iovec(i, bytes, v, iov, skip, ({
    err = fault_in_pages_readable(v.iov_base, v.iov_len);
    if (unlikely(err))

    \
     
     \ /
      Last update: 2021-07-12 08:40    [W:2.096 / U:0.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site