Revert "ANDROID: KVM: arm64: Fix ToCToU issue when refilling the hyp memcache"

This reverts commit 0957aec081.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Id838e47d103f6a9100ae042b73abb2e907f63aa0
This commit is contained in:
Will Deacon
2022-07-07 15:48:51 +01:00
parent 5b5d8886f6
commit 52273e667f

View File

@@ -331,12 +331,6 @@ static void *admit_host_page(void *arg)
int refill_memcache(struct kvm_hyp_memcache *mc, unsigned long min_pages,
struct kvm_hyp_memcache *host_mc)
{
struct kvm_hyp_memcache tmp = *host_mc;
int ret;
ret = __topup_hyp_memcache(mc, min_pages, admit_host_page,
hyp_virt_to_phys, &tmp);
*host_mc = tmp;
return ret;
return __topup_hyp_memcache(mc, min_pages, admit_host_page,
hyp_virt_to_phys, host_mc);
}