riscv: kvm: fix vector context allocation leak
Markus Elfring
Markus.Elfring at web.de
Mon Mar 16 09:36:55 PDT 2026
>>> When the second kzalloc (host_context.vector.datap) fails in
>>> kvm_riscv_vcpu_alloc_vector_context, the first allocation
>>> (guest_context.vector.datap) is leaked. Free it before returning.
>> Were any source code analysis tools involved here?
>>
> No, there were found during manual review.
Would be looking for the support of advanced approaches
which would make such a “inspection” more convenient?
Regards,
Markus
More information about the linux-riscv
mailing list