lkml.org 
[lkml]   [2020]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm: Correct guards for non_swap_entry()
From
Date
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

\
 
 \ /
  Last update: 2020-03-06 10:43    [W:0.047 / U:2.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site