]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: hsr: remove synchronize_rcu() from hsr_add_port()
authorEric Dumazet <edumazet@google.com>
Tue, 7 Jan 2025 14:47:01 +0000 (14:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:55:13 +0000 (13:55 +0100)
[ Upstream commit a3b3d2dc389568a77d0e25da17203e3616218e93 ]

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().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250107144701.503884-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 30296ac76426 ("net: dsa: xrs700x: reject unsupported HSR configurations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/hsr/hsr_slave.c

index 01762525c945646e1c4674adcd139ed3e44e01cf..9ac7cf0835118345931c3ace753ab627711a4505 100644 (file)
@@ -210,7 +210,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);