Files
erofs-linux/kernel/bpf
Shardul Bankar f6fddc6df3 bpf: Fix memory leak in __lookup_instance error path
When __lookup_instance() allocates a func_instance structure but fails
to allocate the must_write_set array, it returns an error without freeing
the previously allocated func_instance. This causes a memory leak of 192
bytes (sizeof(struct func_instance)) each time this error path is triggered.

Fix by freeing 'result' on must_write_set allocation failure.

Fixes: b3698c356a ("bpf: callchain sensitive stack liveness tracking using CFG")
Reported-by: BPF Runtime Fuzzer (BRF)
Signed-off-by: Shardul Bankar <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
Link: https://patch.msgid.link/[email protected]
2025-10-16 10:45:17 -07:00
..
2025-09-11 13:00:43 -07:00
2025-09-23 07:34:38 -07:00
…
…
2025-08-12 14:56:04 -07:00
…
…
2025-09-23 07:34:38 -07:00
…
…
2025-07-11 11:00:57 -07:00
2025-07-16 18:38:05 -07:00