Re: [PATCH] hugetlbfs: always use address space in inode for resv_map pointer

From: Mike Kravetz
Date: Thu May 09 2019 - 19:33:34 EST


On 5/9/19 4:11 PM, Andrew Morton wrote:
> On Wed, 8 May 2019 13:16:09 -0700 Mike Kravetz <mike.kravetz@xxxxxxxxxx> wrote:
>
>>> I think it is better to add fixes label, like:
>>> Fixes: 58b6e5e8f1ad ("hugetlbfs: fix memory leak for resv_map")
>>>
>>> Since the commit 58b6e5e8f1a has been merged to stable, this patch also be needed.
>>> https://www.spinics.net/lists/stable/msg298740.html
>>
>> It must have been the AI that decided 58b6e5e8f1a needed to go to stable.
>
> grr.
>
>> Even though this technically does not fix 58b6e5e8f1a, I'm OK with adding
>> the Fixes: to force this to go to the same stable trees.
>
> Why are we bothering with any of this, given that
>
> : Luckily, private_data is NULL for address spaces in all such cases
> : today but, there is no guarantee this will continue.
>
> ?

You are right. For stable releases, I do not see any way for this to
be an issue. We are lucky today (and in the past). The patch is there
to guard against code changes which may cause this condition to change
in the future.

Yufen Yu, do you see this actually fixing a problem in stable releases?
I believe you originally said this is not a problem today, which would
also imply older releases. Just want to make sure I am not missing something.
--
Mike Kravetz

> Even though 58b6e5e8f1ad was inappropriately backported, the above
> still holds, so what problem does a backport of "hugetlbfs: always use
> address space in inode for resv_map pointer" actually solve?
>
> And yes, some review of this would be nice