Re: [PATCH v2] perf unwind: handle allocation failure in libdw__get_entries()

From: Markus Elfring

Date: Tue Aug 18 2026 - 15:31:19 EST


> Check the return value of zalloc() before dereferencing the allocated
> dwfl_ui_ti structure.
>
> Return -ENOMEM when the allocation fails to avoid a NULL pointer
> dereference.

How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34

https://elixir.bootlin.com/linux/v7.2-rc7/source/tools/perf/util/unwind-libdw.c#L342-L447

Regards,
Markus