diff options
author | Steven Price <steven.price@arm.com> | 2020-06-17 13:54:56 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-06-22 16:39:57 +0300 |
commit | 66b7e05dc0239c5817859f261098ba9cc2efbd2b (patch) | |
tree | 7448f0ece7d7ece2cb471f6be4433eba9b635cae /fs/hugetlbfs | |
parent | 7733306bd593c737c63110175da6c35b4b8bb32c (diff) | |
download | linux-66b7e05dc0239c5817859f261098ba9cc2efbd2b.tar.xz |
KVM: arm64: Fix kvm_reset_vcpu() return code being incorrect with SVE
If SVE is enabled then 'ret' can be assigned the return value of
kvm_vcpu_enable_sve() which may be 0 causing future "goto out" sites to
erroneously return 0 on failure rather than -EINVAL as expected.
Remove the initialisation of 'ret' and make setting the return value
explicit to avoid this situation in the future.
Fixes: 9a3cdf26e336 ("KVM: arm64/sve: Allow userspace to enable SVE for vcpus")
Cc: stable@vger.kernel.org
Reported-by: James Morse <james.morse@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200617105456.28245-1-steven.price@arm.com
Diffstat (limited to 'fs/hugetlbfs')
0 files changed, 0 insertions, 0 deletions