Skip to contentSkip to conversation

net: hsr: remove synchronize_rcu() from hsr_add_port()

PATCH Applied Eric Dumazet 3 participants 3 messages Jan 7, 2025 – Jan 9, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: hsr: remove synchronize_rcu() from hsr_add_port()

A synchronize_rcu() was added by mistake in commit c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.")

RCU does not mandate to observe a grace period after list_add_tail_rcu().

---
 net/hsr/hsr_slave.c | 1 -
 1 file changed, 1 deletion(-)
net/hsr/hsr_slave.c +0 -1
index 006d6ef97e53f4077eb16f08077ee366d8cb4bbd..2a802a5de2acca1d87ad475b3c96d2464a1faad0 100644
@@ -204,7 +204,6 @@ int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev,
 	}
 
 	list_add_tail_rcu(&port->port_list, &hsr->ports);
-	synchronize_rcu();
 
 	master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
 	netdev_update_features(master->dev);
Signature · 1 line
2.47.1.613.gc27f4b7a9f-goog
#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Tue, 7 Jan 2025 14:47:01 +0000 you wrote:

A synchronize_rcu() was added by mistake in commit c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.")

RCU does not mandate to observe a grace period after list_add_tail_rcu().

[...]

Here is the summary with links:
- [net-next] net: hsr: remove synchronize_rcu() from hsr_add_port()

    https://git.kernel.org/netdev/net-next/c/a3b3d2dc3895

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html