Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1803616imu; Wed, 21 Nov 2018 02:07:56 -0800 (PST) X-Google-Smtp-Source: AJdET5dGzscZ4pcrv1A5v7iaNOkVi/tDBSeYg0LuThXWfUstMrt8T9WnyhhNkO7vlHTk/kvP6/Lo X-Received: by 2002:a62:8c11:: with SMTP id m17mr6136284pfd.224.1542794876678; Wed, 21 Nov 2018 02:07:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542794876; cv=none; d=google.com; s=arc-20160816; b=pACc6qcJ1sx/ANG9oYHAwV9Q+ohY/eTKkyl5tUv/+QYhGSjHe9nJ0hXop0j0/RCMiT a6ICMbdq/+A3m7Xlk9bKPlkqXZ91x+tAMSmoGyC+lviid8eMuobOXkWLOvOcZLNSH1aU ppEPVw7a5RQKCYDIjcYw883BWAlCjFmE8fDImbyYIU5/9UWBG/Bmd5iL/hYi65+CkCz9 jbv6q9rpPBDmnixS16UvvWc0M+4VA7QaECR7vJraPzvofqbVaIYDhcmKBToaxEtcgeEW CoYf8Hak8BtzLTdIO0p8YkyOmyoI7PZ7ev4HG2/i3ch9IVWaPdPPOlfRLLboITX0pUeI iNWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=PEt/7/vEcPWJBbY9lNVmnMzWQFEARF8oSnu621UdFhM=; b=oKzin7X8I1NX6nQ1Box0jBZtp8k+yJOMShghXvkjZnBA4UqWqRMyFL1KER2jaxpbk4 TPSO0/NdYEmnOT8DkLAfdm0iz+BYyjjKXr84PTBZh0RwS892WcmU6X45vuawMI33WIyJ KeRi6cIEx6hh/GmwMbYyUBN/AgUla2pfSFf7ox+K4kn6M7tSMKpDKPbcGdj8q9sTgKOG ikb+tD68XcKdDISMIT3YANNS3YSqkEyCeRLUhHGUV2PjKaoYahGUgNj18zY9zs1J7Sbb 6lZd6QOfH6n3JnkXgX2w/B8zgUf35yte20TZOIC0wgrr4Yj8TSUpGdQ4upawKm96OKHY C5fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=WHrs5Fgo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si28654342plr.306.2018.11.21.02.07.41; Wed, 21 Nov 2018 02:07:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=WHrs5Fgo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729080AbeKUU2o (ORCPT + 99 others); Wed, 21 Nov 2018 15:28:44 -0500 Received: from m12-11.163.com ([220.181.12.11]:60688 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbeKUU2n (ORCPT ); Wed, 21 Nov 2018 15:28:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=PEt/7/vEcPWJBbY9lN VmnMzWQFEARF8oSnu621UdFhM=; b=WHrs5FgoT8Z28kMSz0MVRBlme5uesfIFOB dXzumylYgM5Pn2MLkZuc2pZc2Mu+PI7dnk+AzhOMPh/58DPVSUCalbHJkNvM1u5m CJzMiHVoqfmRd716Mj7yjZqBOcUg5Guzm9jQRevafifpcB6Oev/P+OVkwS60lIdE g/36FjFwM= Received: from bp.localdomain (unknown [106.120.213.96]) by smtp7 (Coremail) with SMTP id C8CowACXpVAoK_Vb+kHtBA--.4484S3; Wed, 21 Nov 2018 17:54:18 +0800 (CST) From: Pan Bian To: David Woodhouse , Joerg Roedel Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: use memunmap to free memremap Date: Wed, 21 Nov 2018 17:53:47 +0800 Message-Id: <1542794027-93141-1-git-send-email-bianpan2016@163.com> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: C8CowACXpVAoK_Vb+kHtBA--.4484S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrZry3CF4Dur43Wr15XrW3GFg_yoWxAFcEgF 40vF4Iqr90vFWrZF1ayF9xZryqkw15uFZ3uFW8KFyayw4q9Fn7CFs5Zr4kXay3GrWUJF98 tr4vyF4xAryxXjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5znQUUUUUU== X-Originating-IP: [106.120.213.96] X-CM-SenderInfo: held01tdqsiiqw6rljoofrz/xtbBzwoGclaD0W5JawAAs5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org memunmap() should be used to free the return of memremap(), not iounmap(). Fixes: dfddb969edf0("iommu/vt-d: Switch from ioremap_cache to memremap") Signed-off-by: Pan Bian --- drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f3ccf02..41a4b88 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3075,7 +3075,7 @@ static int copy_context_table(struct intel_iommu *iommu, } if (old_ce) - iounmap(old_ce); + memunmap(old_ce); ret = 0; if (devfn < 0x80) -- 2.7.4