Revert "gup: document and work around "COW can break either way" issue"
authorBen Hutchings <ben@decadent.org.uk>
Mon, 24 Jan 2022 13:38:28 +0000 (14:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 07:47:42 +0000 (08:47 +0100)
commit6fbb8383884f2c89f4c7e2c8603b5ed1b90b815f
tree7904fbf9d6dbf809f5346b84dde949826416228d
parent31f961674d04bfec4718296d8ecf59537251270b
Revert "gup: document and work around "COW can break either way" issue"

This reverts commit 9bbd42e79720122334226afad9ddcac1c3e6d373, which
was commit 17839856fd588f4ab6b789f482ed3ffd7c403e1f upstream.  The
backport was incorrect and incomplete:

* It forced the write flag on in the generic __get_user_pages_fast(),
  whereas only get_user_pages_fast() was supposed to do that.
* It only fixed the generic RCU-based implementation used by arm,
  arm64, and powerpc.  Before Linux 4.13, several other architectures
  had their own implementations: mips, s390, sparc, sh, and x86.

This will be followed by a (hopefully) correct backport.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/gup.c
mm/huge_memory.c