Skip to content

[PW_SID:1073922] riscv/kvm: fix guest vector leak on host alloc failure#1679

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1073922
Closed

[PW_SID:1073922] riscv/kvm: fix guest vector leak on host alloc failure#1679
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1073922

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1073922 applied to workflow__riscv__fixes

Name: riscv/kvm: fix guest vector leak on host alloc failure
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1073922
Version: 1

When allocating vector context for a vCPU, guest_context.vector.datap is allocated before host_context.vector.datap. If the second allocation fails, the function returns -ENOMEM directly and leaks the guest buffer.

Switch the failure path to centralized cleanup. On host allocation failure, free guest_context.vector.datap, clear the pointer, and return -ENOMEM through a shared exit label.

Signed-off-by: Yufan Chen <ericterminal@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1019.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1385.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
kdoc
Desc: Detects for kdoc errors
Duration: 0.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv/kvm: fix guest vector leak on host alloc failure"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1073922 branch March 31, 2026 23:37
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