public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 07/14] ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep()
       [not found] <20230315181902.4177819-1-joel@joelfernandes.org>
@ 2023-03-15 18:18 ` Joel Fernandes (Google)
  2023-03-15 19:07   ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Fernandes (Google) @ 2023-03-15 18:18 UTC (permalink / raw)
  To: Theodore Ts'o, Andreas Dilger
  Cc: Uladzislau Rezki (Sony), Lukas Czerner, Paul E . McKenney,
	Joel Fernandes, linux-ext4, linux-kernel

From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>

The kfree_rcu() and kvfree_rcu() macros' single-argument forms are
deprecated.  Therefore switch to the new kfree_rcu_mightsleep() and
kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use
of the single-argument forms, which can introduce functionality bugs in
atomic contexts and latency bugs in non-atomic contexts.

Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 88f7b8a88c76..405a66b47311 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2500,7 +2500,7 @@ static void ext4_apply_quota_options(struct fs_context *fc,
 			qname = rcu_replace_pointer(sbi->s_qf_names[i], qname,
 						lockdep_is_held(&sb->s_umount));
 			if (qname)
-				kfree_rcu(qname);
+				kfree_rcu_mightsleep(qname);
 		}
 	}
 
-- 
2.40.0.rc1.284.g88254d51c5-goog


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

* Re: [PATCH v2 07/14] ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep()
  2023-03-15 18:18 ` [PATCH v2 07/14] ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep() Joel Fernandes (Google)
@ 2023-03-15 19:07   ` Theodore Ts'o
  2023-03-16 15:23     ` Joel Fernandes
  0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2023-03-15 19:07 UTC (permalink / raw)
  To: Joel Fernandes (Google)
  Cc: Andreas Dilger, Uladzislau Rezki (Sony), Lukas Czerner,
	Paul E . McKenney, linux-ext4, linux-kernel

On Wed, Mar 15, 2023 at 06:18:54PM +0000, Joel Fernandes (Google) wrote:
> From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> 
> The kfree_rcu() and kvfree_rcu() macros' single-argument forms are
> deprecated.  Therefore switch to the new kfree_rcu_mightsleep() and
> kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use
> of the single-argument forms, which can introduce functionality bugs in
> atomic contexts and latency bugs in non-atomic contexts.
> 
> Cc: Theodore Ts'o <tytso@mit.edu>
> Cc: Lukas Czerner <lczerner@redhat.com>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>

Acked-by: Theodore Ts'o <tytso@mit.edu>


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

* Re: [PATCH v2 07/14] ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep()
  2023-03-15 19:07   ` Theodore Ts'o
@ 2023-03-16 15:23     ` Joel Fernandes
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Fernandes @ 2023-03-16 15:23 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: Andreas Dilger, Uladzislau Rezki (Sony), Lukas Czerner,
	Paul E . McKenney, linux-ext4, linux-kernel

On Wed, Mar 15, 2023 at 3:07 PM Theodore Ts'o <tytso@mit.edu> wrote:
>
> On Wed, Mar 15, 2023 at 06:18:54PM +0000, Joel Fernandes (Google) wrote:
> > From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> >
> > The kfree_rcu() and kvfree_rcu() macros' single-argument forms are
> > deprecated.  Therefore switch to the new kfree_rcu_mightsleep() and
> > kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use
> > of the single-argument forms, which can introduce functionality bugs in
> > atomic contexts and latency bugs in non-atomic contexts.
> >
> > Cc: Theodore Ts'o <tytso@mit.edu>
> > Cc: Lukas Czerner <lczerner@redhat.com>
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
>
> Acked-by: Theodore Ts'o <tytso@mit.edu>
>

Thanks!

 - Joel

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

end of thread, other threads:[~2023-03-16 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230315181902.4177819-1-joel@joelfernandes.org>
2023-03-15 18:18 ` [PATCH v2 07/14] ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep() Joel Fernandes (Google)
2023-03-15 19:07   ` Theodore Ts'o
2023-03-16 15:23     ` Joel Fernandes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox