From: Fabio M. De Francesco Date: Thu, 1 Sep 2022 15:44:07 +0000 (+0200) Subject: misc/xilinx_sdfec: Call kunmap() on pages mapped with kmap() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e01b08d7f6d36f20533b7510ea3af90756125f35;p=linux.git misc/xilinx_sdfec: Call kunmap() on pages mapped with kmap() 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" Cc: Ira Weiny Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20220901154408.23984-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c index d6e3c650bd112..4b1d82ae73125 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;