From nobody Mon Apr 29 06:53:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1619113438; cv=none; d=zohomail.com; s=zohoarc; b=nIYJum4zB1olTZPZMSZWFBKOKvotKokLGWf+uFXU6ejIVRC+Wbh1iMckzrKcPaAoa9GZKTOKPtDCYy3oRQwe8DuQV25Zw1NXOmb6jQz1oDnSpPTqcVI02PB6c2e1j5l57kLAkXudKSh4c5LdtbX0V+KBz91jN94s3NBsdRViYUM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619113438; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=AzfpKaBdrt3x7984/tvCLbD88cab96Phr9IzS6ojQd4=; b=AYtRTXiv2S3rrZpX4Y0QI00MkAGtmMIwHym5/ICyVGE4nAd57qm2jT0YhymvnZLDkCph22Xr8mPd4aH25lM1YKISR3jPgOUYH4X9Ur34llZqLHDLl70b/CRsxCTGnhIEoSIaksaw4PyebVxef9BNJjKOqOzllLoczXom1MUFy90= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1619113438483700.731630795825; Thu, 22 Apr 2021 10:43:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.115769.220914 (Exim 4.92) (envelope-from ) id 1lZdMP-0001Tb-I5; Thu, 22 Apr 2021 17:43:29 +0000 Received: by outflank-mailman (output) from mailman id 115769.220914; Thu, 22 Apr 2021 17:43:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lZdMP-0001TU-F1; Thu, 22 Apr 2021 17:43:29 +0000 Received: by outflank-mailman (input) for mailman id 115769; Thu, 22 Apr 2021 17:43:28 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lZdMO-0001T6-7k for xen-devel@lists.xenproject.org; Thu, 22 Apr 2021 17:43:28 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lZdMO-0003NY-16; Thu, 22 Apr 2021 17:43:28 +0000 Received: from 54-240-197-228.amazon.com ([54.240.197.228] helo=ua82172827c7b5a.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZdMN-00038B-JO; Thu, 22 Apr 2021 17:43:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Message-Id:Date:Subject:Cc:To:From; bh=AzfpKaBdrt3x7984/tvCLbD88cab96Phr9IzS6ojQd4=; b=hh/y4HXpxsco8erDeu6Ou/s0R+ kcdn9vWUanHZD4hFghReBXhQbeI83CdjJ8MkCq2yghwMgtvWAvemTagQnFiCtDZ6Ml/BD0AcAr+8j 4UseTu+CrxnI9LFjMrqAEnueB+ywwoSxzuSRZiNp69g5urUmGtKn1SwO/5CxDC0CuYmk=; From: Hongyan Xia To: xen-devel@lists.xenproject.org Cc: Hongyan Xia , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH] x86/mm: fix wrong unmap call Date: Thu, 22 Apr 2021 18:42:30 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 X-ZohoMail-DKIM: pass (identity @xen.org) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Hongyan Xia Commit 'x86/mm: switch to new APIs in modify_xen_mappings' applied the hunk of the unmap call to map_pages_to_xen() which was wrong and clearly should have been at the end of modify_xen_mappings(). Fix. Fixes: dd68f2e49bea ("x86/mm: switch to new APIs in modify_xen_mappings") Signed-off-by: Hongyan Xia Tested-by: Julien Grall --- xen/arch/x86/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 50229e38d384..84e3ccf47e2a 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5532,7 +5532,6 @@ int map_pages_to_xen( =20 out: L3T_UNLOCK(current_l3page); - unmap_domain_page(pl2e); unmap_domain_page(pl3e); unmap_domain_page(pl2e); return rc; @@ -5830,6 +5829,7 @@ int modify_xen_mappings(unsigned long s, unsigned lon= g e, unsigned int nf) out: L3T_UNLOCK(current_l3page); unmap_domain_page(pl3e); + unmap_domain_page(pl2e); return rc; } =20 --=20 2.17.1