lkml.org 
[lkml]   [2021]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] mm/page_isolation: guard against possible putback unisolated page
From
Date
On 2021/9/15 10:09, Andrew Morton wrote:
> On Tue, 14 Sep 2021 19:45:08 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
>
>> Isolating a free page in an isolated pageblock is expected to always work
>> as watermarks don't apply here. But if __isolate_free_page() failed, due
>> to condition changes, the page will be left on the free list. And the page
>> will be put back to free list again via __putback_isolated_page(). This may
>> trigger VM_BUG_ON_PAGE() on page->flags checking in __free_one_page() if
>> PageReported is set. Or we will corrupt the free list because list_add()
>> will be called for pages already on another list. Add a VM_WARN_ON() to
>> complain about this change.
>
> Are you able to identify a Fixes: here?
>

Sure, this should be "Fixes: 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock")."

> Is a cc:stable justified?

I'm afraid not. As David pointed out,
""

In unset_migratetype_isolate() we check that is_migrate_isolate_page(page) holds, otherwise we return.

We call __isolate_free_page() only for such pages.

__isolate_free_page() won't perform watermark checks on is_migrate_isolate().

Consequently, __isolate_free_page() should never fail when called from unset_migratetype_isolate()


""

In a nutshell, __isolate_free_page can not fail here. So it is harmless now and doesn't worth cc:stable.

Please see https://www.spinics.net/lists/linux-mm/msg269434.html for detail.

Many thanks.

> .
>

\
 
 \ /
  Last update: 2021-09-15 08:39    [W:2.851 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site