stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Please add commit 145e1a71e090 to stable
@ 2018-06-03 20:03 Hugh Dickins
  2018-06-03 20:12 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2018-06-03 20:03 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, Ben Hutchings, Sasha Levin, Ivan Kalvachev,
	Andrew Morton, Mel Gorman, Minchan Kim, Vlastimil Babka

Please add 4.17 commit 145e1a71e090575c74969e3daa8136d1e5b99fc8
("mm: fix the NULL mapping case in __isolate_lru_page()")
to the 4.16, 4.14, 4.9, 4.4, 3.18 and 3.2 stable kernel trees.

Two things happened after I'd sent it to Andrew without a stable tag:
1. Ivan posted an equivalent patch: after painstaking bisection, he
   had found the fixed commit to be what was causing strange blocking
   (surprising to the rest of us, we had imagined it just suboptimal).
2. The fixed commit arrived in five stable kernel releases (presumably
   arriving there by auto selection: which will in due course pick up
   this fix to it, but I don't know its cadence).

Thanks,
Hugh

From: Hugh Dickins <hughd@google.com>
Date: Fri, 1 Jun 2018 16:50:50 -0700

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>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9b697323a88c..9270a4370d54 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1418,7 +1418,7 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
 				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;
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Please add commit 145e1a71e090 to stable
  2018-06-03 20:03 Please add commit 145e1a71e090 to stable Hugh Dickins
@ 2018-06-03 20:12 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2018-06-03 20:12 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: stable, Ben Hutchings, Sasha Levin, Ivan Kalvachev, Andrew Morton,
	Mel Gorman, Minchan Kim, Vlastimil Babka

On Sun, Jun 03, 2018 at 01:03:48PM -0700, Hugh Dickins wrote:
> Please add 4.17 commit 145e1a71e090575c74969e3daa8136d1e5b99fc8
> ("mm: fix the NULL mapping case in __isolate_lru_page()")
> to the 4.16, 4.14, 4.9, 4.4, 3.18 and 3.2 stable kernel trees.
> 
> Two things happened after I'd sent it to Andrew without a stable tag:
> 1. Ivan posted an equivalent patch: after painstaking bisection, he
>    had found the fixed commit to be what was causing strange blocking
>    (surprising to the rest of us, we had imagined it just suboptimal).
> 2. The fixed commit arrived in five stable kernel releases (presumably
>    arriving there by auto selection: which will in due course pick up
>    this fix to it, but I don't know its cadence).

Thanks for letting us know, now queued up for 4.16, 4.14, 4.9, 4.4, and
3.18.  3.2 is now end-of-life, but 3.16 is still alive, Ben can take
care of that.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-03 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-03 20:03 Please add commit 145e1a71e090 to stable Hugh Dickins
2018-06-03 20:12 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).