Re: [PATCH] selftests/mm: khugepaged: remove str_dup() usage

From: Zi Yan

Date: Tue Aug 25 2026 - 07:57:28 EST


On Tue Aug 25, 2026 at 7:20 AM EDT, David Hildenbrand (Arm) wrote:
> We don't check str_dup() return value and never free it. While both
> things are irrelevant in practice, let's just clean it up by working on
> argv[0] directly and avoiding the str_dup().
>
> Nobody after us needs these parts of the argv[0] string anyway.
>
> This patch is inspired by previous work from Anshuman Tewari [1].
>
> Link: https://lore.kernel.org/r/20260821114416.12255-1-anshumantewari123@xxxxxxxxx [1]
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> ---
> tools/testing/selftests/mm/khugepaged.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

LGTM.

Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>



--
Best Regards,
Yan, Zi