Re: [PATCH v2] mm/page_isolation: fix potential missing call to unset_migratetype_isolate()
From: Miaohe Lin
Date: Mon Sep 13 2021 - 23:09:53 EST
On 2021/9/13 20:59, Michal Hocko wrote:
> On Mon 13-09-21 20:43:35, Miaohe Lin wrote:
>> On 2021/9/13 20:20, David Hildenbrand wrote:
>>> On 13.09.21 14:12, Michal Hocko wrote:
>>>> On Mon 13-09-21 19:51:25, 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 simplify the code further.
>>>>
>>>> I like the clean up part but is this a real problem that requires CC
>>>> stable? Have you ever seen this to be a real problem? It looks like
>>>> something based on reading the code.
>>
>> I'm sorry but I haven't seen this to be a real problem. It's a theoretical bug.
>
> Make it clear in the changelog
Will do.
>
>>> We discussed that it isn't an issue anymore (we never call it on
>>> memory holes), but might have been an issue on older kernels, back
>>> when we didn't have the "memory holes" check in the memory offlining
>>> path in place.
>>
>> So is the Cc:stable needed in this case?
>
> I do not think so. Even if this was happening in the practice then the
> practical consequences would be pretty minor, right? (few pageblocks
> stay isolated thus unavailable).
>
> I do realize that the stable tree is in a hoarding mode for quite some
> years but my general approach has been (in line with the documentation)
> to mark and backport only fixes that really do matter.
So even the Fixes tag should be removed ?
Many thanks.
>