]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Jun 2018 20:11:24 +0000 (22:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Jun 2018 20:11:24 +0000 (22:11 +0200)
added patches:
mm-fix-the-null-mapping-case-in-__isolate_lru_page.patch

queue-3.18/mm-fix-the-null-mapping-case-in-__isolate_lru_page.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/mm-fix-the-null-mapping-case-in-__isolate_lru_page.patch b/queue-3.18/mm-fix-the-null-mapping-case-in-__isolate_lru_page.patch
new file mode 100644 (file)
index 0000000..f23b726
--- /dev/null
@@ -0,0 +1,47 @@
+From 145e1a71e090575c74969e3daa8136d1e5b99fc8 Mon Sep 17 00:00:00 2001
+From: Hugh Dickins <hughd@google.com>
+Date: Fri, 1 Jun 2018 16:50:50 -0700
+Subject: mm: fix the NULL mapping case in __isolate_lru_page()
+
+From: Hugh Dickins <hughd@google.com>
+
+commit 145e1a71e090575c74969e3daa8136d1e5b99fc8 upstream.
+
+George Boole would have noticed a slight error in 4.16 commit
+69d763fc6d3a ("mm: pin address_space before dereferencing it while
+isolating an LRU page").  Fix it, to match both the comment above it,
+and the original behaviour.
+
+Although anonymous pages are not marked PageDirty at first, we have an
+old habit of calling SetPageDirty when a page is removed from swap
+cache: so there's a category of ex-swap pages that are easily
+migratable, but were inadvertently excluded from compaction's async
+migration in 4.16.
+
+Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1805302014001.12558@eggly.anvils
+Fixes: 69d763fc6d3a ("mm: pin address_space before dereferencing it while isolating an LRU page")
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Acked-by: Minchan Kim <minchan@kernel.org>
+Acked-by: Mel Gorman <mgorman@techsingularity.net>
+Reported-by:  Ivan Kalvachev <ikalvachev@gmail.com>
+Cc: "Huang, Ying" <ying.huang@intel.com>
+Cc: Jan Kara <jack@suse.cz>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/vmscan.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mm/vmscan.c
++++ b/mm/vmscan.c
+@@ -1234,7 +1234,7 @@ int __isolate_lru_page(struct page *page
+                               return ret;
+                       mapping = page_mapping(page);
+-                      migrate_dirty = mapping && mapping->a_ops->migratepage;
++                      migrate_dirty = !mapping || mapping->a_ops->migratepage;
+                       unlock_page(page);
+                       if (!migrate_dirty)
+                               return ret;
index 202f954d01f0c965585b3c3fa2a17c90a1401ef6..e30edb7ff8bc581527ce3993001d3539e6a8045f 100644 (file)
@@ -5,3 +5,4 @@ tcp-avoid-integer-overflows-in-tcp_rcv_space_adjust.patch
 mips-ptrace-fix-ptrace_peekusr-requests-for-64-bit-fgrs.patch
 drm-i915-disable-lvds-on-radiant-p845.patch
 fix-io_destroy-aio_complete-race.patch
+mm-fix-the-null-mapping-case-in-__isolate_lru_page.patch