All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: David Hildenbrand <david@redhat.com>, <akpm@linux-foundation.org>
Cc: <mhocko@suse.com>, <vbabka@suse.cz>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/page_isolation: fix potential missing call to unset_migratetype_isolate()
Date: Mon, 6 Sep 2021 19:42:47 +0800	[thread overview]
Message-ID: <b9e53a7a-b1ae-a581-af3c-6848dada9449@huawei.com> (raw)
In-Reply-To: <ec7fd827-55c8-120f-4c68-ec0076797d36@redhat.com>

On 2021/9/6 17:46, David Hildenbrand wrote:
> On 06.09.21 11:38, Miaohe Lin wrote:
>> On 2021/9/6 17:27, David Hildenbrand wrote:
>>> On 04.09.21 11:20, Miaohe Lin wrote:
>>>> In start_isolate_page_range() undo path, pfn_to_online_page() just checks
>>>> the first pfn in a pageblock while __first_valid_page() will traverse the
>>>> pageblock until the first online pfn is found. So we may miss the call to
>>>> unset_migratetype_isolate() in undo path and pages will remain isolated
>>>> unexpectedly. Fix this by calling undo_isolate_page_range() and this will
>>>> also help to remove some duplicated codes.
>>>>
>>>> Fixes: 2ce13640b3f4 ("mm: __first_valid_page skip over offline pages")
>>>
>>> While that is true, we shouldn't ever trigger, neither via cma, virtio-mem nor memory offlining, because essentially all operate on MAX_ORDER -1 -aligned ranges without memory holes.
>>
>> I think this should never trigger too. It's a theoretical issue. So is the Fixes tag necessary ?
>>
> 
> I think it's one of these "let's add Fixes: but no need for Cc: stable".
> 
> BUT in older kernels we could have triggered this via memory offlining eventually ... before c5e79ef561b0 ("mm/memory_hotplug.c: don't allow to online/offline memory blocks with holes") ... so maybe even a Cc: stable?

Looks like it could happen in older kernels. Maybe a Cc: stable is necessary.
Many thanks.

> 


      reply	other threads:[~2021-09-06 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04  9:20 [PATCH] mm/page_isolation: fix potential missing call to unset_migratetype_isolate() Miaohe Lin
2021-09-06  9:27 ` David Hildenbrand
2021-09-06  9:38   ` Miaohe Lin
2021-09-06  9:46     ` David Hildenbrand
2021-09-06 11:42       ` Miaohe Lin [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=b9e53a7a-b1ae-a581-af3c-6848dada9449@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.