On 10 Mar 2026, at 5:49, Sayali Patil wrote:

> The cleanup loop of allocated memory currently uses:
>
>     for (entry = list; entry != NULL; entry = entry->next) {
>         munmap(entry->map, MAP_SIZE);
>         if (!entry->next)
>             break;
>         entry = entry->next;
>     }
>
> The inner entry = entry->next causes the loop to skip every
> other node, resulting in only half of the mapped regions being
> unmapped.
>
> Remove the redundant increment to ensure every entry is visited
> and unmapped during cleanup.
>
> Fixes: bd67d5c15cc1 ("Test compaction of mlocked memory")
> Signed-off-by: Sayali Patil <[email protected]>
> ---
>  tools/testing/selftests/mm/compaction_test.c | 3 ---
>  1 file changed, 3 deletions(-)
>
Thank you for fixing it.

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

Best Regards,
Yan, Zi

Reply via email to