lkml.org 
[lkml]   [2023]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH next] iov_iter: fix copy_page_from_iter_atomic()
    [PATCH next] iov_iter: fix copy_page_from_iter_atomic()

    Trying to test tmpfs on latest linux-next, copying and building kernel
    trees, huge pages, and swapping while swapping off involved: lots of
    cp: error writing '/tmp/2624/Documentation/fb/vesafb.txt': Bad address
    cp: error writing '/tmp/2624/arch/mips/math-emu/dp_fsp.c': Bad address
    etc.

    Bisection leads to next-20231006's 376fdc4552f1 ("iov_iter:
    Don't deal with iter->copy_mc in memcpy_from_iter_mc()") from vfs.git.
    The tweak below makes it healthy again: please feel free to fold in.

    Signed-off-by: Hugh Dickins <hughd@google.com>

    --- a/lib/iov_iter.c
    +++ b/lib/iov_iter.c
    @@ -497,7 +497,7 @@ size_t copy_page_from_iter_atomic(struct
    }

    p = kmap_atomic(page) + offset;
    - __copy_from_iter(p, n, i);
    + n = __copy_from_iter(p, n, i);
    kunmap_atomic(p);
    copied += n;
    offset += n;
    \
     
     \ /
      Last update: 2023-10-07 06:34    [W:6.523 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site