mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: objtool/core] objtool/klp: Fix XXH3 state memory leak
@ 2026-05-05 10:56 tip-bot2 for Josh Poimboeuf
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Josh Poimboeuf @ 2026-05-05 10:56 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Song Liu, Miroslav Benes, Josh Poimboeuf, x86, linux-kernel

The following commit has been merged into the objtool/core branch of tip:

Commit-ID:     479ac5260e7ea717f1ea7b1e74dfe807d3b46eda
Gitweb:        https://git.kernel.org/tip/479ac5260e7ea717f1ea7b1e74dfe807d3b46eda
Author:        Josh Poimboeuf <jpoimboe@kernel.org>
AuthorDate:    Thu, 02 Apr 2026 17:35:53 -07:00
Committer:     Josh Poimboeuf <jpoimboe@kernel.org>
CommitterDate: Mon, 04 May 2026 21:16:01 -07:00

objtool/klp: Fix XXH3 state memory leak

The XXH3 state allocated in checksum_init() is never freed.  Free it in
checksum_finish().

Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 tools/objtool/include/objtool/checksum.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/objtool/include/objtool/checksum.h b/tools/objtool/include/objtool/checksum.h
index 7fe2160..0bd16fe 100644
--- a/tools/objtool/include/objtool/checksum.h
+++ b/tools/objtool/include/objtool/checksum.h
@@ -26,6 +26,7 @@ static inline void checksum_finish(struct symbol *func)
 {
 	if (func && func->csum.state) {
 		func->csum.checksum = XXH3_64bits_digest(func->csum.state);
+		XXH3_freeState(func->csum.state);
 		func->csum.state = NULL;
 	}
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-05 10:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-05 10:56 [tip: objtool/core] objtool/klp: Fix XXH3 state memory leak tip-bot2 for Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®