From: Gerd Rausch <gerd.rausch@oracle.com>
To: santosh.shilimkar@oracle.com, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com
Subject: [PATCH 1/1] net/rds: Use "unpin_user_page" as "pin_user_pages" counterpart
Date: Wed, 06 Apr 2022 14:03:05 -0700 [thread overview]
Message-ID: <47050fe9f6f26f11fc14ff0ac06547f73ec3b81e.camel@oracle.com> (raw)
In cases where "pin_user_pages" was used to obtain longerm references,
the pages must be released with "unpin_user_pages".
Fixes: 0d4597c8c5ab ("net/rds: Track user mapped pages through special API")
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
---
net/rds/ib_rdma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index 8f070ee7e742..9d86d6db98c4 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -256,8 +256,7 @@ void __rds_ib_teardown_mr(struct rds_ib_mr *ibmr)
/* FIXME we need a way to tell a r/w MR
* from a r/o MR */
WARN_ON(!page->mapping && irqs_disabled());
- set_page_dirty(page);
- put_page(page);
+ unpin_user_pages_dirty_lock(&page, 1, true);
}
kfree(ibmr->sg);
next reply other threads:[~2022-04-06 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 21:03 Gerd Rausch [this message]
2022-04-06 21:52 ` [PATCH 1/1] net/rds: Use "unpin_user_page" as "pin_user_pages" counterpart Sharath Srinivasan
2022-04-07 5:44 ` Jakub Kicinski
2022-04-07 15:58 ` Jason Gunthorpe
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=47050fe9f6f26f11fc14ff0ac06547f73ec3b81e.camel@oracle.com \
--to=gerd.rausch@oracle.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@oracle.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;
as well as URLs for NNTP newsgroup(s).