]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iov_iter: Introduce fault_in_iov_iter_writeable
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 14 Apr 2022 22:28:41 +0000 (06:28 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:22:30 +0000 (14:22 +0200)
commit5647396d3c1b4eca937bb6673b2da47305b6829f
tree881539c9f9cee62831ffc58b1af106b5bccc5e22
parent0b6acf4e489504e0ededb0dc0b16ff70572b283b
iov_iter: Introduce fault_in_iov_iter_writeable

BugLink: https://bugs.launchpad.net/bugs/1976135
commit cdd591fc86e38ad3899196066219fbbd845f3162 upstream

Introduce a new fault_in_iov_iter_writeable helper for safely faulting
in an iterator for writing.  Uses get_user_pages() to fault in the pages
without actually writing to them, which would be destructive.

We'll use fault_in_iov_iter_writeable in gfs2 once we've determined that
the iterator passed to .read_iter isn't in memory.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/linux/pagemap.h
include/linux/uio.h
lib/iov_iter.c
mm/gup.c