--- /dev/null
+From b224975a2c971c773f1211483a1392262fe8fb15 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Sat, 13 Jan 2018 11:19:07 +0100
+Subject: Revert "userfaultfd: selftest: vm: allow to build in vm/ directory"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit b5213e1e9f25ccde958aa6364815ee87fef91100 which was
+commit 46aa6a302b53f543f8e8b8e1714dc5e449ad36a6 upstream.
+
+This is being reverted because the affected commit this was trying to
+fix, a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT"), was never
+backported to the 4.4-stable tree.
+
+Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
+Cc: Andrea Arcangeli <aarcange@redhat.com>
+Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
+Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
+Cc: Mike Kravetz <mike.kravetz@oracle.com>
+Cc: Pavel Emelyanov <xemul@parallels.com>
+Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/vm/Makefile | 4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/tools/testing/selftests/vm/Makefile
++++ b/tools/testing/selftests/vm/Makefile
+@@ -1,9 +1,5 @@
+ # Makefile for vm selftests
+
+-ifndef OUTPUT
+- OUTPUT := $(shell pwd)
+-endif
+-
+ CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
+ BINARIES = compaction_test
+ BINARIES += hugepage-mmap