Message ID | 20190916041417.12533-12-jarkko.sakkinen@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | v23 updates | expand |
diff --git a/arch/x86/kernel/cpu/sgx/reclaim.c b/arch/x86/kernel/cpu/sgx/reclaim.c index 4ae6122c18e5..c2a85db68307 100644 --- a/arch/x86/kernel/cpu/sgx/reclaim.c +++ b/arch/x86/kernel/cpu/sgx/reclaim.c @@ -345,7 +345,7 @@ static void sgx_encl_ewb(struct sgx_epc_page *epc_page, if (encls_failed(ret) || encls_returned_code(ret)) ENCLS_WARN(ret, "EWB"); - sgx_free_va_slot(va_page, va_offset); + sgx_encl_destroy(encl); } else { encl_page->desc |= va_offset; encl_page->va_page = va_page;
There is not much we can do if the EWB flow fails. It can fail if the binding of the backing storage fails or if the enclave is running inside a VM and the host is suspended. Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: Shay Katz-zamir <shay.katz-zamir@intel.com> Cc: Serge Ayoun <serge.ayoun@intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> --- arch/x86/kernel/cpu/sgx/reclaim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)