netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sharath Srinivasan <sharath.srinivasan@oracle.com>
To: Gerd Rausch <gerd.rausch@oracle.com>,
	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: Re: [PATCH 1/1] net/rds: Use "unpin_user_page" as "pin_user_pages" counterpart
Date: Wed, 6 Apr 2022 14:52:21 -0700	[thread overview]
Message-ID: <d641f93c-6369-b97d-3aaa-38ee026c2bb2@oracle.com> (raw)
In-Reply-To: <47050fe9f6f26f11fc14ff0ac06547f73ec3b81e.camel@oracle.com>

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@oracle.com>
Reviewed-by: Sharath Srinivasan <sharath.srinivasan@oracle.com>

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

  reply	other threads:[~2022-04-06 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=d641f93c-6369-b97d-3aaa-38ee026c2bb2@oracle.com \
    --to=sharath.srinivasan@oracle.com \
    --cc=davem@davemloft.net \
    --cc=gerd.rausch@oracle.com \
    --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).