public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Joel Fernandes <joel@joelfernandes.org>
To: Uladzislau Rezki <urezki@gmail.com>
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>, Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leon@kernel.org>,
	linux-rdma@vger.kernel.org, Bob Pearson <rpearsonhpe@gmail.com>,
	Jason Gunthorpe <jgg@nvidia.com>,
	LKML <linux-kernel@vger.kernel.org>, RCU <rcu@vger.kernel.org>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>,
	Jens Axboe <axboe@kernel.dk>,
	Philipp Reisner <philipp.reisner@linbit.com>,
	Bryan Tan <bryantan@vmware.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Eric Dumazet <edumazet@google.com>,
	Ariel Levkovich <lariel@nvidia.com>,
	Theodore Ts'o <tytso@mit.edu>, Julian Anastasov <ja@ssi.bg>
Subject: Re: [PATCH 07/13] RDMA/rxe: Rename kfree_rcu() to kfree_rcu_mightsleep()
Date: Fri, 10 Mar 2023 00:55:29 +0000	[thread overview]
Message-ID: <20230310005529.GA339498@google.com> (raw)
In-Reply-To: <ZAnpdKV/VvvX0TZz@pc636>

On Thu, Mar 09, 2023 at 03:13:08PM +0100, Uladzislau Rezki wrote:
> > On Wed, Feb 01, 2023 at 04:08:13PM +0100, Uladzislau Rezki (Sony) wrote:
> > > The kfree_rcu()'s single argument name is deprecated therefore
> > > rename it to kfree_rcu_mightsleep() variant. The goal is explicitly
> > > underline that it is for sleepable contexts.
> > > 
> > > Please check the RXE driver in a way that a single argument can
> > > be used. Briefly looking at it and rcu_head should be embed to
> > > free an obj over RCU-core. The context might be atomic.
> > > 
> > > Cc: Bob Pearson <rpearsonhpe@gmail.com>
> > > Cc: Jason Gunthorpe <jgg@nvidia.com>
> > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > > ---
> > >  drivers/infiniband/sw/rxe/rxe_pool.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > Could you please add you reviwed-by or Acked-by tags so we can bring
> > our series with renaming for the next merge window?
> > 
> > Thanks!
> > 
> __rxe_cleanup() can be called in two contexts, sleepable and not.
> Therefore usage of a single argument of the kvfree_rcu() is not correct
> here.
> 
> Could you please fix and check your driver? If my above statement
> is not correct, please provide Acked-by or Reviwed-by tags to the
> path that is in question.
> 
> Otherwise please add an rcu_head in your data to free objects over
> kvfree_rcu() using double argument API.
> 
> Could you please support?

Also this one needs renaming? It came in because of the commit in 6.3-rc1:
72a03627443d ("RDMA/rxe: Remove rxe_alloc()")

It could be squashed into this patch itself since it is infiniband related.

Paul noticed that this breaks dropping the old API on -next, so it is
blocking the renaming.

---8<-----------------------

diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index b10aa1580a64..ae3a100e18fb 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -731,7 +731,7 @@ int rxe_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
 		return -EINVAL;
 
 	rxe_cleanup(mr);
-	kfree_rcu(mr);
+	kfree_rcu_mightsleep(mr);
 	return 0;
 }
 

  reply	other threads:[~2023-03-10  0:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230201150815.409582-1-urezki@gmail.com>
     [not found] ` <20230201150815.409582-8-urezki@gmail.com>
     [not found]   ` <ZAnjnRC1wY3RIFhM@pc636>
2023-03-09 14:13     ` [PATCH 07/13] RDMA/rxe: Rename kfree_rcu() to kfree_rcu_mightsleep() Uladzislau Rezki
2023-03-10  0:55       ` Joel Fernandes [this message]
2023-03-13 19:43         ` Bob Pearson
2023-03-15 11:50           ` Joel Fernandes
2023-03-15 18:07             ` Bob Pearson
2023-03-14  6:31       ` Zhu Yanjun

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=20230310005529.GA339498@google.com \
    --to=joel@joelfernandes.org \
    --cc=axboe@kernel.dk \
    --cc=bryantan@vmware.com \
    --cc=edumazet@google.com \
    --cc=ja@ssi.bg \
    --cc=jgg@nvidia.com \
    --cc=jgg@ziepe.ca \
    --cc=lariel@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=oleksiy.avramchenko@sony.com \
    --cc=paulmck@kernel.org \
    --cc=philipp.reisner@linbit.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=tytso@mit.edu \
    --cc=urezki@gmail.com \
    --cc=zyjzyj2000@gmail.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