Message ID | 1484081758-20302-4-git-send-email-sean.j.christopherson@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/platform/x86/intel_sgx_ioctl.c b/drivers/platform/x86/intel_sgx_ioctl.c index 3a4a8fa..b78c552 100644 --- a/drivers/platform/x86/intel_sgx_ioctl.c +++ b/drivers/platform/x86/intel_sgx_ioctl.c @@ -435,7 +435,10 @@ static int sgx_init_page(struct sgx_encl *encl, va_page->epc_page = epc_page; va_offset = sgx_alloc_va_slot(va_page); + + mutex_lock(&encl->lock); list_add(&va_page->list, &encl->va_pages); + mutex_unlock(&encl->lock); } entry->va_page = va_page;