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:
Mostafa Saleh <smostafa@google.com>
Loading
Please sign in to comment