Re: [PATCH v2] arm: fix uninitialized pointers with free attr

From: Sudeep Holla

Date: Wed Dec 03 2025 - 10:52:01 EST


On Wed, Dec 03, 2025 at 08:52:34PM +0530, Ally Heev wrote:
> Uninitialized pointers with `__free` attribute can cause undefined
> behaviour as the memory assigned(randomly) to the pointer is freed
> automatically when the pointer goes out of scope
>
> arm doesn't have any bugs related to this as of now, but
> it is better to initialize and assign pointers with `__free` attr
> in one statement to ensure proper scope-based cleanup
>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/aPiG_F5EBQUjZqsl@stanley.mountain/
> Signed-off-by: Ally Heev <allyheev@xxxxxxxxx>
> Reviewed-by: Cristian Marussi <cristian.marussi@xxxxxxx>
> ---
> Changes in v2:
> - added Reviewed-by trailer

Ideally, there is no need to repost the same patch with just trailers added.
Sorry for no response, I plan to queue this at -rc1 as fix, so please give
me some time to officially apply at -rc1. I have put this a branch, so I won't
miss this but may need to rebase and hence silence.

--
Regards,
Sudeep