From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: ying.huang@intel.com, aarcange@redhat.com,
akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
mhocko@kernel.org, stable@vger.kernel.org,
torvalds@linux-foundation.org, vbabka@suse.cz,
william.kucharski@oracle.com, ziy@nvidia.com
Subject: Re: FAILED: patch "[PATCH] mm: fix possible PMD dirty bit lost in" failed to apply to 4.14-stable tree
Date: Mon, 9 Mar 2020 17:58:25 -0400 [thread overview]
Message-ID: <20200309215825.GA24841@sasha-vm> (raw)
In-Reply-To: <158378131510638@kroah.com>
On Mon, Mar 09, 2020 at 08:15:15PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.14-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 8a8683ad9ba48b4b52a57f013513d1635c1ca5c4 Mon Sep 17 00:00:00 2001
>From: Huang Ying <ying.huang@intel.com>
>Date: Thu, 5 Mar 2020 22:28:29 -0800
>Subject: [PATCH] mm: fix possible PMD dirty bit lost in
> set_pmd_migration_entry()
>
>In set_pmd_migration_entry(), pmdp_invalidate() is used to change PMD
>atomically. But the PMD is read before that with an ordinary memory
>reading. If the THP (transparent huge page) is written between the PMD
>reading and pmdp_invalidate(), the PMD dirty bit may be lost, and cause
>data corruption. The race window is quite small, but still possible in
>theory, so need to be fixed.
>
>The race is fixed via using the return value of pmdp_invalidate() to get
>the original content of PMD, which is a read/modify/write atomic
>operation. So no THP writing can occur in between.
>
>The race has been introduced when the THP migration support is added in
>the commit 616b8371539a ("mm: thp: enable thp migration in generic path").
>But this fix depends on the commit d52605d7cb30 ("mm: do not lose dirty
>and accessed bits in pmdp_invalidate()"). So it's easy to be backported
>after v4.16. But the race window is really small, so it may be fine not
>to backport the fix at all.
As d52605d7cb30 ("mm: do not lose dirty and accessed bits in
pmdp_invalidate()") has an explicit note asking not to backport it, we
won't backport it or this patch to 4.14.
--
Thanks,
Sasha
prev parent reply other threads:[~2020-03-09 21:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 19:15 FAILED: patch "[PATCH] mm: fix possible PMD dirty bit lost in" failed to apply to 4.14-stable tree gregkh
2020-03-09 21:58 ` Sasha Levin [this message]
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=20200309215825.GA24841@sasha-vm \
--to=sashal@kernel.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=mhocko@kernel.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
--cc=william.kucharski@oracle.com \
--cc=ying.huang@intel.com \
--cc=ziy@nvidia.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