linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Dan Williams" <dan.j.williams@intel.com>
Subject: Re: [PATCH] mm: Correct guards for non_swap_entry()
Date: Fri, 6 Mar 2020 09:41:16 +0000	[thread overview]
Message-ID: <efa519d1-5f0a-11a6-e143-c83698b7e5b2@arm.com> (raw)
In-Reply-To: <20200305194431.7fe10d760d9921d0eff106c1@linux-foundation.org>

On 06/03/2020 03:44, Andrew Morton wrote:
> On Thu,  5 Mar 2020 13:05:50 +0000 Steven Price <steven.price@arm.com> wrote:
> 
>> If CONFIG_DEVICE_PRIVATE is defined, but neither CONFIG_MEMORY_FAILURE nor
>> CONFIG_MIGRATION, then non_swap_entry() will return 0, meaning that the
>> condition (non_swap_entry(entry) && is_device_private_entry(entry)) in
>> zap_pte_range() will never be true even if the entry is a device private
>> one.
>>
>> Equally any other code depending on non_swap_entry() will not function
>> as expected.
> 
> What are the user-visible runtime effects of this change?
> 
> Is a cc:stable needed?
> 

I originally spotted this just by looking at the code, I haven't
actually observed any problems.

Looking a bit more closely it appears that actually this situation
(currently at least) cannot occur:

DEVICE_PRIVATE depends on ZONE_DEVICE
ZONE_DEVICE depends on MEMORY_HOTREMOVE
MEMORY_HOTREMOVE depends on MIGRATION

So there's probably no need to back port.

Steve

      reply	other threads:[~2020-03-06  9:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 13:05 [PATCH] mm: Correct guards for non_swap_entry() Steven Price
2020-03-06  3:44 ` Andrew Morton
2020-03-06  9:41   ` Steven Price [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=efa519d1-5f0a-11a6-e143-c83698b7e5b2@arm.com \
    --to=steven.price@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).