net: hsr: remove one synchronize_rcu() from hsr_del_port()

Use kfree_rcu() instead of synchronize_rcu()+kfree().

This might allow syzbot to fuzz HSR a bit faster...

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250103101148.3594545-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2025-01-03 10:11:48 +00:00 committed by Jakub Kicinski
parent 95fc45d1de
commit 4475d56145
2 changed files with 2 additions and 3 deletions

View file

@ -163,6 +163,7 @@ struct hsr_port {
struct net_device *dev;
struct hsr_priv *hsr;
enum hsr_port_type type;
struct rcu_head rcu;
};
struct hsr_frame_info;

View file

@ -235,7 +235,5 @@ void hsr_del_port(struct hsr_port *port)
netdev_upper_dev_unlink(port->dev, master->dev);
}
synchronize_rcu();
kfree(port);
kfree_rcu(port, rcu);
}