linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: use memunmap to free memremap
@ 2018-11-21  9:53 Pan Bian
  2018-11-22 16:03 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Pan Bian @ 2018-11-21  9:53 UTC (permalink / raw)
  To: David Woodhouse, Joerg Roedel; +Cc: iommu, linux-kernel

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 <bianpan2016@163.com>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu: use memunmap to free memremap
  2018-11-21  9:53 [PATCH] iommu: use memunmap to free memremap Pan Bian
@ 2018-11-22 16:03 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2018-11-22 16:03 UTC (permalink / raw)
  To: Pan Bian; +Cc: David Woodhouse, iommu, linux-kernel

On Wed, Nov 21, 2018 at 05:53:47PM +0800, Pan Bian wrote:
> 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 <bianpan2016@163.com>
> ---
>  drivers/iommu/intel-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-22 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21  9:53 [PATCH] iommu: use memunmap to free memremap Pan Bian
2018-11-22 16:03 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).