mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
ANDROID: virt: gunyah: Zero state_data after vcpu_run
Do not re-use stale state_data on subsequent vcpu runs as the stale data could be interpreted by Gunyah and rejected. Bug: 268234781 Change-Id: I3d4bf7a922da1e0e85006ffa58b64a74e320d3c9 Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
This commit is contained in:
@@ -196,6 +196,7 @@ static int gh_vcpu_run(struct gh_vcpu *vcpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gh_error = gh_hypercall_vcpu_run(vcpu->rsc->capid, state_data, &vcpu_run_resp);
|
gh_error = gh_hypercall_vcpu_run(vcpu->rsc->capid, state_data, &vcpu_run_resp);
|
||||||
|
memset(state_data, 0, sizeof(state_data));
|
||||||
if (gh_error == GH_ERROR_OK) {
|
if (gh_error == GH_ERROR_OK) {
|
||||||
switch (vcpu_run_resp.state) {
|
switch (vcpu_run_resp.state) {
|
||||||
case GH_VCPU_STATE_READY:
|
case GH_VCPU_STATE_READY:
|
||||||
|
|||||||
Reference in New Issue
Block a user