Skip to content

[PW_SID:1092009] [v2] riscv: Fix memory leak in apply_relocate_add#1896

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1092009
Closed

[PW_SID:1092009] [v2] riscv: Fix memory leak in apply_relocate_add#1896
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1092009

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1092009 applied to workflow__riscv__fixes

Name: [v2] riscv: Fix memory leak in apply_relocate_add
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1092009
Version: 2

Linux RISC-V bot and others added 2 commits May 2, 2026 08:13
The error path in apply_relocate_add() forgets to clean up the hashtable
allocated at the beginning. But we should not use
process_accumulated_relocations() as a cleanup function because some
entries may be half-finished, and we cannot write incorrect values back
to memory.

So, add cleanup_accumulated_relocations() for freeing all memory
allocated in the error paths.

Fixes: 8fd6c51 ("riscv: Add remaining module relocations")
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Zishun Yi <vulab@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1130.35 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1680.35 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.20 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 86.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: Fix memory leak in apply_relocate_add"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 2d4fcdd to cd9d421 Compare May 14, 2026 08:49
@linux-riscv-bot linux-riscv-bot deleted the pw1092009 branch May 17, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants