[PATCH 1/3] arm64: mte: Fix double-freeing of the temporary tag storage during coredump
Catalin Marinas
catalin.marinas at arm.com
Thu Dec 22 10:12:49 PST 2022
Commit 16decce22efa ("arm64: mte: Fix the stack frame size warning in
mte_dump_tag_range()") moved the temporary tag storage array from the
stack to slab but it also introduced an error in double freeing this
object. Remove the in-loop freeing.
Fixes: 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()")
Cc: <stable at vger.kernel.org> # 5.18.x
Signed-off-by: Catalin Marinas <catalin.marinas at arm.com>
Reported-by: Seth Jenkins <sethjenkins at google.com>
Cc: Will Deacon <will at kernel.org>
---
arch/arm64/kernel/elfcore.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/kernel/elfcore.c b/arch/arm64/kernel/elfcore.c
index 27ef7ad3ffd2..4e3f84799669 100644
--- a/arch/arm64/kernel/elfcore.c
+++ b/arch/arm64/kernel/elfcore.c
@@ -65,7 +65,6 @@ static int mte_dump_tag_range(struct coredump_params *cprm,
mte_save_page_tags(page_address(page), tags);
put_page(page);
if (!dump_emit(cprm, tags, MTE_PAGE_TAG_STORAGE)) {
- mte_free_tag_storage(tags);
ret = 0;
break;
}
More information about the linux-arm-kernel
mailing list