From: "Zi Yan" <zi.yan@cs.rutgers.edu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"Andrea Reale" <ar@linux.vnet.ibm.com>,
"Naoya Horiguchi" <n-horiguchi@ah.jp.nec.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] mm: migrate: fix an incorrect call of prep_transhuge_page()
Date: Tue, 21 Nov 2017 17:35:45 -0500 [thread overview]
Message-ID: <73A54AD9-33E0-4C82-8C9F-6E1786ED6132@cs.rutgers.edu> (raw)
In-Reply-To: <20171121141213.89db86bfbd75c22fc0209990@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
On 21 Nov 2017, at 17:12, Andrew Morton wrote:
> On Mon, 20 Nov 2017 21:18:55 -0500 Zi Yan <zi.yan@sent.com> wrote:
>
>> In [1], Andrea reported that during memory hotplug/hot remove
>> prep_transhuge_page() is called incorrectly on non-THP pages for
>> migration, when THP is on but THP migration is not enabled.
>> This leads to a bad state of target pages for migration.
>>
>> This patch fixes it by only calling prep_transhuge_page() when we are
>> certain that the target page is THP.
>
> What are the user-visible effects of the bug?
By inspecting the code, if called on a non-THP, prep_transhuge_page() will
1) change the value of the mapping of (page + 2), since it is used for THP deferred list;
2) change the lru value of (page + 1), since it is used for THP’s dtor.
Both can lead to data corruption of these two pages.
—
Best Regards,
Yan Zi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 557 bytes --]
next prev parent reply other threads:[~2017-11-21 22:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 2:18 Zi Yan
2017-11-21 22:12 ` Andrew Morton
2017-11-21 22:35 ` Zi Yan [this message]
2017-11-22 9:43 ` Andrea Reale
2017-11-22 8:54 ` Michal Hocko
2017-11-22 9:18 ` Zi Yan
2017-11-22 9:35 ` Michal Hocko
2017-11-22 10:14 ` Michal Hocko
2017-11-22 12:13 ` Zi Yan
2017-11-22 12:29 ` Zi Yan
2017-11-22 13:01 ` Michal Hocko
2017-11-22 13:40 ` Michal Hocko
2017-11-22 14:43 ` Zi Yan
2017-11-22 14:53 ` Michal Hocko
2017-11-22 15:09 ` Zi Yan
2017-11-22 15:39 ` Michal Hocko
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=73A54AD9-33E0-4C82-8C9F-6E1786ED6132@cs.rutgers.edu \
--to=zi.yan@cs.rutgers.edu \
--cc=akpm@linux-foundation.org \
--cc=ar@linux.vnet.ibm.com \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=stable@vger.kernel.org \
/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