netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net/rds: Use "unpin_user_page" as "pin_user_pages" counterpart
@ 2022-04-06 21:03 Gerd Rausch
  2022-04-06 21:52 ` Sharath Srinivasan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerd Rausch @ 2022-04-06 21:03 UTC (permalink / raw)
  To: santosh.shilimkar, davem, kuba, pabeni, netdev, linux-rdma,
	rds-devel

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);
 


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

end of thread, other threads:[~2022-04-07 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06 21:03 [PATCH 1/1] net/rds: Use "unpin_user_page" as "pin_user_pages" counterpart Gerd Rausch
2022-04-06 21:52 ` Sharath Srinivasan
2022-04-07  5:44 ` Jakub Kicinski
2022-04-07 15:58 ` Jason Gunthorpe

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).