Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Eric Dumazet and committed by
Jakub Kicinski
4475d561 95fc45d1

+2 -3
+1
net/hsr/hsr_main.h
··· 163 163 struct net_device *dev; 164 164 struct hsr_priv *hsr; 165 165 enum hsr_port_type type; 166 + struct rcu_head rcu; 166 167 }; 167 168 168 169 struct hsr_frame_info;
+1 -3
net/hsr/hsr_slave.c
··· 235 235 netdev_upper_dev_unlink(port->dev, master->dev); 236 236 } 237 237 238 - synchronize_rcu(); 239 - 240 - kfree(port); 238 + kfree_rcu(port, rcu); 241 239 }