lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] misc/xilinx_sdfec: Call kunmap() on pages mapped with kmap()
Date
Pages in an array are mapped in a loop but, after the code is done with
the virtual addresses, these pages are never unmapped.

Therefore, call kunmap() to unmap pages[i].

Cc: "Venkataramanan, Anirudh" <anirudh.venkataramanan@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
drivers/misc/xilinx_sdfec.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index d6e3c650bd11..4b1d82ae7312 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xilinx_sdfec.c
@@ -645,6 +645,7 @@ static int xsdfec_table_write(struct xsdfec_dev *xsdfec, u32 offset,
reg++;
} while ((reg < len) &&
((reg * XSDFEC_REG_WIDTH_JUMP) % PAGE_SIZE));
+ kunmap(pages[i]);
unpin_user_page(pages[i]);
}
return 0;
--
2.37.2
\
 
 \ /
  Last update: 2022-09-01 17:45    [W:0.788 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site