linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Hugh Dickins <hughd@google.com>,
	Minchan Kim <minchan@kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Ivan Kalvachev <ikalvachev@gmail.com>,
	"Huang, Ying" <ying.huang@intel.com>, Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 4.4 34/37] mm: fix the NULL mapping case in __isolate_lru_page()
Date: Tue,  5 Jun 2018 19:01:39 +0200	[thread overview]
Message-ID: <20180605170110.886053413@linuxfoundation.org> (raw)
In-Reply-To: <20180605170108.884872354@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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
@@ -1331,7 +1331,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;

  parent reply	other threads:[~2018-06-05 17:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 17:01 [PATCH 4.4 00/37] 4.4.136-stable review Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 01/37] arm64: lse: Add early clobbers to some input/output asm operands Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 02/37] powerpc/64s: Clear PCR on boot Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 03/37] USB: serial: cp210x: use tcflag_t to fix incompatible pointer type Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 04/37] sh: New gcc support Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 05/37] xfs: detect agfl count corruption and reset agfl Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 06/37] Revert "ima: limit file hash setting by user to fix and log modes" Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 07/37] Input: elan_i2c_smbus - fix corrupted stack Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 08/37] tracing: Fix crash when freeing instances with event triggers Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 09/37] selinux: KASAN: slab-out-of-bounds in xattr_getsecurity Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 10/37] cfg80211: further limit wiphy names to 64 bytes Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 11/37] rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 12/37] ASoC: Intel: sst: remove redundant variable dma_dev_name Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 13/37] irda: fix overly long udelay() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 14/37] tcp: avoid integer overflows in tcp_rcv_space_adjust() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 15/37] i2c: rcar: make sure clocks are on when doing clock calculation Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 16/37] i2c: rcar: rework hw init Greg Kroah-Hartman
2018-06-18 18:46   ` Ben Hutchings
2018-06-25 10:05     ` Fabrizio Castro
2018-06-05 17:01 ` [PATCH 4.4 17/37] i2c: rcar: remove unused IOERROR state Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 18/37] i2c: rcar: remove spinlock Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 19/37] i2c: rcar: refactor setup of a msg Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 20/37] i2c: rcar: init new messages in irq Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 21/37] i2c: rcar: dont issue stop when HW does it automatically Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 22/37] i2c: rcar: check master irqs before slave irqs Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 23/37] i2c: rcar: revoke START request early Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 24/37] dmaengine: usb-dmac: fix endless loop in usb_dmac_chan_terminate_all() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 25/37] iio:kfifo_buf: check for uint overflow Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 26/37] MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 27/37] MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 28/37] scsi: scsi_transport_srp: Fix shost to rport translation Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 29/37] stm class: Use vmalloc for the master map Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 30/37] hwtracing: stm: fix build error on some arches Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 32/37] Kbuild: change CC_OPTIMIZE_FOR_SIZE definition Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 33/37] fix io_destroy()/aio_complete() race Greg Kroah-Hartman
2018-06-05 17:01 ` Greg Kroah-Hartman [this message]
2018-06-05 17:01 ` [PATCH 4.4 35/37] sparc64: Add __multi3 for gcc 7.x and later Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 36/37] sparc64: Dont clibber fixed registers in __multi4 Greg Kroah-Hartman
2018-06-05 21:59 ` [PATCH 4.4 00/37] 4.4.136-stable review Shuah Khan
2018-06-06  0:30 ` Nathan Chancellor
2018-06-06  8:19   ` Greg Kroah-Hartman
2018-06-06 11:18 ` Naresh Kamboju
2018-06-06 12:15   ` Greg Kroah-Hartman
2018-06-06 13:28 ` Guenter Roeck
2018-06-06 13:31   ` Greg Kroah-Hartman
2018-06-06 15:01     ` Guenter Roeck
2018-06-06 15:35       ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180605170110.886053413@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=ikalvachev@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=minchan@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).