On 4/6/22 14:03, Gerd Rausch wrote:
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@xxxxxxxxxx>
Reviewed-by: Sharath Srinivasan <sharath.srinivasan@xxxxxxxxxx> Regards, Sharath
--- 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);