Re: [PATCH] hugetlbfs: fix error handling in init_hugetlbfs_fs()

From: Mike Kravetz
Date: Tue Oct 29 2019 - 18:36:57 EST


On 10/29/19 3:24 PM, Andrew Morton wrote:
> On Tue, 29 Oct 2019 13:47:38 -0700 Mike Kravetz <mike.kravetz@xxxxxxxxxx> wrote:
>
>> It is assumed that the hugetlbfs_vfsmount[] array will contain
>> either a valid vfsmount pointer or NULL for each hstate after
>> initialization. Changes made while converting to use fs_context
>> broke this assumption.
>>
>> While fixing the hugetlbfs_vfsmount issue, it was discovered that
>> init_hugetlbfs_fs never did correctly clean up when encountering
>> a vfs mount error.
>
> What were the user-visible runtime effects of this bug?
>
> (IOW: why does it warrant the cc:stable?)

On second thought, let's not cc stable.

It was found during code inspection. A small memory allocation failure
would be the most likely cause of taking a error path with the bug. This
is unlikely to happen as this is early init code.

Sorry about that,
--
Mike Kravetz