From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Derek Kiernan <derek.kiernan@xilinx.com>,
Dragan Cvetic <dragan.cvetic@xilinx.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michal Simek <michal.simek@xilinx.com>,
Ira Weiny <ira.weiny@intel.com>,
"Venkataramanan, Anirudh" <anirudh.venkataramanan@intel.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: [PATCH 1/2] misc/xilinx_sdfec: Call kunmap() on pages mapped with kmap()
Date: Thu, 1 Sep 2022 17:44:07 +0200 [thread overview]
Message-ID: <20220901154408.23984-2-fmdefrancesco@gmail.com> (raw)
In-Reply-To: <20220901154408.23984-1-fmdefrancesco@gmail.com>
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
next prev parent reply other threads:[~2022-09-01 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 15:44 [PATCH 0/2] misc/xilinx_sdfec: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2022-09-01 15:44 ` Fabio M. De Francesco [this message]
2022-09-01 15:44 ` [PATCH 2/2] " Fabio M. De Francesco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901154408.23984-2-fmdefrancesco@gmail.com \
--to=fmdefrancesco@gmail.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=arnd@arndb.de \
--cc=derek.kiernan@xilinx.com \
--cc=dragan.cvetic@xilinx.com \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®