From patchwork Fri Jan 20 22:01:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 9529569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DBD9D6020B for ; Fri, 20 Jan 2017 22:02:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5C61286D6 for ; Fri, 20 Jan 2017 22:02:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6DA7286E1; Fri, 20 Jan 2017 22:02:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 59EC1286D6 for ; Fri, 20 Jan 2017 22:02:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 45CD081EA6 for ; Fri, 20 Jan 2017 14:02:26 -0800 (PST) X-Original-To: intel-sgx-kernel-dev@lists.01.org Delivered-To: intel-sgx-kernel-dev@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 373A381E9D for ; Fri, 20 Jan 2017 14:02:25 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 20 Jan 2017 14:01:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,260,1477983600"; d="scan'208";a="215840245" Received: from sjchrist-ts.jf.intel.com ([10.54.74.20]) by fmsmga004.fm.intel.com with ESMTP; 20 Jan 2017 14:01:54 -0800 From: Sean Christopherson To: intel-sgx-kernel-dev@lists.01.org Date: Fri, 20 Jan 2017 14:01:12 -0800 Message-Id: <1484949673-8605-3-git-send-email-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484949673-8605-1-git-send-email-sean.j.christopherson@intel.com> References: <20170116233656.6225-1-jarkko.sakkinen@linux.intel.com> <1484949673-8605-1-git-send-email-sean.j.christopherson@intel.com> Subject: [intel-sgx-kernel-dev] [PATCH FIX 2/3] fixup - intel_sgx: backing storage file for PCMD X-BeenThere: intel-sgx-kernel-dev@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Project: Intel® Software Guard Extensions for Linux*: https://01.org/intel-software-guard-extensions" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-sgx-kernel-dev-bounces@lists.01.org Sender: "intel-sgx-kernel-dev" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sean Christopherson --- 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,