Thread (2 messages) 2 messages, 2 authors, 2025-12-03

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

From: Sudeep Holla <hidden>
Date: 2025-12-03 15:52:01
Also in: arm-scmi, lkml

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 <redacted>
Closes: https://lore.kernel.org/all/aPiG_F5EBQUjZqsl@stanley.mountain/ (local)
Signed-off-by: Ally Heev <redacted>
Reviewed-by: Cristian Marussi <cristian.marussi@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help