mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
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:
parent
95fc45d1de
commit
4475d56145
2 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue