diff mbox

[intel-sgx-kernel-dev,FIX,2/3] fixup - intel_sgx: backing storage file for PCMD

Message ID 1484949673-8605-3-git-send-email-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Christopherson Jan. 20, 2017, 10:01 p.m. UTC
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 drivers/platform/x86/intel_sgx_vma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jarkko Sakkinen Jan. 21, 2017, 8:34 p.m. UTC | #1
On Fri, Jan 20, 2017 at 02:01:12PM -0800, Sean Christopherson wrote:
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  drivers/platform/x86/intel_sgx_vma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel_sgx_vma.c b/drivers/platform/x86/intel_sgx_vma.c
> index 7e53c4a..46b81da 100644
> --- a/drivers/platform/x86/intel_sgx_vma.c
> +++ b/drivers/platform/x86/intel_sgx_vma.c
> @@ -148,8 +148,6 @@ static int sgx_eldu(struct sgx_encl *encl,
>  	epc_ptr = sgx_get_epc_page(epc_page);
>  	va_ptr = sgx_get_epc_page(encl_page->va_page->epc_page);
>  	pginfo.srcpge = (unsigned long)kmap_atomic(backing);
> -
> -	pginfo.srcpge = (unsigned long)kmap_atomic(backing);
>  	pginfo.pcmd = (unsigned long)kmap_atomic(pcmd) + pcmd_offset;
>  	pginfo.linaddr = is_secs ? 0 : encl_page->addr;
>  	pginfo.secs = (unsigned long)secs_ptr;
> @@ -175,7 +173,7 @@ static int sgx_eldu(struct sgx_encl *encl,
>  
>  out:
>  	sgx_put_backing(backing, 0);
> -	return 0;
> +	return ret;
>  }
>  
>  static struct sgx_encl_page *sgx_vma_do_fault(struct vm_area_struct *vma,
> -- 
> 2.7.4
> 
> _______________________________________________
> intel-sgx-kernel-dev mailing list
> intel-sgx-kernel-dev@lists.01.org
> https://lists.01.org/mailman/listinfo/intel-sgx-kernel-dev

Thanks you.

/Jarkko
diff mbox

Patch

diff --git a/drivers/platform/x86/intel_sgx_vma.c b/drivers/platform/x86/intel_sgx_vma.c
index 7e53c4a..46b81da 100644
--- a/drivers/platform/x86/intel_sgx_vma.c
+++ b/drivers/platform/x86/intel_sgx_vma.c
@@ -148,8 +148,6 @@  static int sgx_eldu(struct sgx_encl *encl,
 	epc_ptr = sgx_get_epc_page(epc_page);
 	va_ptr = sgx_get_epc_page(encl_page->va_page->epc_page);
 	pginfo.srcpge = (unsigned long)kmap_atomic(backing);
-
-	pginfo.srcpge = (unsigned long)kmap_atomic(backing);
 	pginfo.pcmd = (unsigned long)kmap_atomic(pcmd) + pcmd_offset;
 	pginfo.linaddr = is_secs ? 0 : encl_page->addr;
 	pginfo.secs = (unsigned long)secs_ptr;
@@ -175,7 +173,7 @@  static int sgx_eldu(struct sgx_encl *encl,
 
 out:
 	sgx_put_backing(backing, 0);
-	return 0;
+	return ret;
 }
 
 static struct sgx_encl_page *sgx_vma_do_fault(struct vm_area_struct *vma,