gup: Introduce FOLL_NOFAULT flag to disable page faults
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 14 Apr 2022 22:28:51 +0000 (06:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 May 2022 15:22:32 +0000 (17:22 +0200)
commit6e213bc61446d5aefcedb00251c275e30ce82ab5
tree1ef9c3317256185048cf8d776abee06ce2c5d630
parentd3b744791bf06bc9720bfa36bc1757f25802d68b
gup: Introduce FOLL_NOFAULT flag to disable page faults

commit 55b8fe703bc51200d4698596c90813453b35ae63 upstream

Introduce a new FOLL_NOFAULT flag that causes get_user_pages to return
-EFAULT when it would otherwise trigger a page fault.  This is roughly
similar to FOLL_FAST_ONLY but available on all architectures, and less
fragile.

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>
include/linux/mm.h
mm/gup.c