Commit 21e25954 authored by Mostafa Saleh's avatar Mostafa Saleh
Browse files

ANDROID: KVM: Fix error path of allocator topup



When topup of a hypervisor allocator fails, __pkvm_topup_hyp_alloc_mgt_gfp()
will try to free the memcache. However, some prefix of it might be already
donated, which will cause a panic when the kernel touches the hypervisor
memory.
This patch fixes this, by making the hypervisor return the suffix of the
memcache that was not donated, so the kernel can free it.

Bug: 443560485
Change-Id: I91ec95fbd2a23049cb374464e74c54142678dc49
Signed-off-by: default avatarMostafa Saleh <smostafa@google.com>
parent 682cf98f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment