[PATCH v2] arm: fix uninitialized pointers with free attr
Sudeep Holla
sudeep.holla at arm.com
Wed Dec 3 07:51:56 PST 2025
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 at linaro.org>
> Closes: https://lore.kernel.org/all/aPiG_F5EBQUjZqsl@stanley.mountain/
> Signed-off-by: Ally Heev <allyheev at gmail.com>
> Reviewed-by: Cristian Marussi <cristian.marussi at arm.com>
> ---
> 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
More information about the linux-arm-kernel
mailing list