Re: [PATCH] mm: handle potential NULL return from anon_vma_name_reuse()
From: Ye Liu
Date: Tue Apr 21 2026 - 05:27:44 EST
在 2026/4/21 17:08, Lorenzo Stoakes 写道:
> NAK, expected allocation failures (even if practically impossible) should not
> cause arbitrary kernel warnings.
Thank you both for the thorough review and explanation.
You are absolutely right. I mistakenly assumed that leaving vma->anon_name
as NULL could lead to a NULL pointer dereference in some path, but as you
pointed out, the code is designed to treat NULL as "no name", which is
perfectly valid.
I also acknowledge that adding a WARN_ON_ONCE in an allocation failure path
is incorrect and harmful under memory pressure.
Please disregard this patch. I've learned a valuable lesson about error
handling in cosmetic features.
Thank you again for the guidance.
--
Thanks,
Ye Liu