]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mm: fix __gup_device_huge vs unmap
authorDan Williams <dan.j.williams@intel.com>
Fri, 20 Apr 2018 04:32:19 +0000 (21:32 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commitea4eebb59c00e2d51a0b39184e49373adf901ab4
tree017a02584733ec159f133b1574c09ac3cf58f992
parente3c404fbcb511ae694d270b358cf869007c9ba56
mm: fix __gup_device_huge vs unmap

BugLink: http://bugs.launchpad.net/bugs/1807469
commit a9b6de77b1a3ff729f7bfc54b2e17711776a416c upstream.

get_user_pages_fast() for device pages is missing the typical validation
that all page references have been taken while the mapping was valid.
Without this validation truncate operations can not reliably coordinate
against new page reference events like O_DIRECT.

Cc: <stable@vger.kernel.org>
Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings")
Reported-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
mm/gup.c