[PATCH] arm: fix uninitialized pointers with free attr

Cristian Marussi cristian.marussi at arm.com
Thu Nov 13 02:56:53 PST 2025


On Wed, Nov 05, 2025 at 07:37:52PM +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

Hi,

> 
> 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
>

Thanks for this, I agree that it is better to stick to the intended
usage-pattern in order to avoid future issues when the nearby code
changes; for this reason I would also NOT add a Fix tag (...like you
effectively did NOT...just to clarify why :P)

Reviewed-by: Cristian Marussi <cristian.marussi at arm.com>

Thanks,
Cristian



More information about the linux-arm-kernel mailing list