]> www.infradead.org Git - users/jedix/linux-maple.git/commit
riscv: module: remove relocation_head rel_entry member allocation
authorClément Léger <cleger@rivosinc.com>
Thu, 28 Nov 2024 08:16:34 +0000 (09:16 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 8 Jan 2025 18:22:52 +0000 (10:22 -0800)
commit03f0b548537f758830bdb2dc3f2aba713069cef2
treeb363f2215e310d3379456ee149349670e76c2eda
parent498d5b14db8c9118be139f668720c67bea2dc344
riscv: module: remove relocation_head rel_entry member allocation

relocation_head's list_head member, rel_entry, doesn't need to be
allocated, its storage can just be part of the allocated relocation_head.
Remove the pointer which allows to get rid of the allocation as well as
an existing memory leak found by Kai Zhang using kmemleak.

Fixes: 8fd6c5142395 ("riscv: Add remaining module relocations")
Reported-by: Kai Zhang <zhangkai@iscas.ac.cn>
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Tested-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20241128081636.3620468-1-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/module.c