mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/2] net: Use call_rcu_flush() for dst_destroy_rcu
@ 2022-11-18 19:19 Joel Fernandes (Google)
  2022-11-18 19:19 ` [PATCH v2 2/2] net: devinet: Reduce refcount before grace period Joel Fernandes (Google)
  2022-11-18 22:22 ` [PATCH v2 1/2] net: Use call_rcu_flush() for dst_destroy_rcu Paul E. McKenney
  0 siblings, 2 replies; 4+ messages in thread
From: Joel Fernandes (Google) @ 2022-11-18 19:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Joel Fernandes (Google),
	David Ahern, David S. Miller, Eric Dumazet, Hideaki YOSHIFUJI,
	Jakub Kicinski, netdev, Paolo Abeni, rcu, rostedt, paulmck,
	fweisbec

In a networking test on ChromeOS, we find that using the new
CONFIG_RCU_LAZY causes a networking test to fail in the teardown phase.

The failure happens during: ip netns del <name>

Using ftrace, I found the callbacks it was queuing which this series fixes.
Use call_rcu_flush() to revert to the old behavior. With that, the test
passes.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 net/core/dst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dst.c b/net/core/dst.c
index bc9c9be4e080..15b16322703f 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -174,7 +174,7 @@ void dst_release(struct dst_entry *dst)
 			net_warn_ratelimited("%s: dst:%p refcnt:%d\n",
 					     __func__, dst, newrefcnt);
 		if (!newrefcnt)
-			call_rcu(&dst->rcu_head, dst_destroy_rcu);
+			call_rcu_flush(&dst->rcu_head, dst_destroy_rcu);
 	}
 }
 EXPORT_SYMBOL(dst_release);
-- 
2.38.1.584.g0f3c55d4c2-goog


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

end of thread, other threads:[~2022-11-18 22:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 19:19 [PATCH v2 1/2] net: Use call_rcu_flush() for dst_destroy_rcu Joel Fernandes (Google)
2022-11-18 19:19 ` [PATCH v2 2/2] net: devinet: Reduce refcount before grace period Joel Fernandes (Google)
2022-11-18 22:23   ` Paul E. McKenney
2022-11-18 22:22 ` [PATCH v2 1/2] net: Use call_rcu_flush() for dst_destroy_rcu Paul E. McKenney

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

all inboxes | Powered by JetHome®