On 6 Apr 2026, at 5:19, Sayali Patil wrote:

> Dynamically allocated buffers of PMD size for file-backed
> THP operations (file_buf1 and file_buf2) were not freed on
> the success path and some failure paths. Since the
> function is called repeatedly in a loop for each split order,
> this can cause significant memory leaks.
>
> On architectures with large PMD sizes, repeated leaks
> could exhaust system memory and trigger the OOM killer
> during test execution.
>
> Ensure all allocated buffers are freed to maintain
> stable repeated test runs.
>
> Fixes: 035a112e5fd5 ("selftests/mm: make file-backed THP split work by 
> writing PMD size data")
> Signed-off-by: Sayali Patil <[email protected]>
> ---
>  .../selftests/mm/split_huge_page_test.c       | 22 ++++++++++++++-----
>  1 file changed, 16 insertions(+), 6 deletions(-)
>
Thank you for fixing it.

Reviewed-by: Zi Yan <[email protected]>

Best Regards,
Yan, Zi

Reply via email to