* [PATCH net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port()
@ 2025-01-03 10:11 Eric Dumazet
2025-01-06 14:56 ` Simon Horman
2025-01-07 0:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2025-01-03 10:11 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: netdev, Simon Horman, eric.dumazet, Eric Dumazet
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>
---
net/hsr/hsr_main.h | 1 +
net/hsr/hsr_slave.c | 4 +---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index fcfeb79bb04018f3a84be3e24f29c6b92f2d8be1..7d7551e6f0b02ad965561eb45885a949dcf1756c 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -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;
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index 464f683e016dbba659ac0e4f2e02306bfd016ad9..006d6ef97e53f4077eb16f08077ee366d8cb4bbd 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -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);
}
--
2.47.1.613.gc27f4b7a9f-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port()
2025-01-03 10:11 [PATCH net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port() Eric Dumazet
@ 2025-01-06 14:56 ` Simon Horman
2025-01-07 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-01-06 14:56 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S. Miller, Jakub Kicinski, Paolo Abeni, netdev,
eric.dumazet
On Fri, Jan 03, 2025 at 10:11:48AM +0000, Eric Dumazet wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port()
2025-01-03 10:11 [PATCH net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port() Eric Dumazet
2025-01-06 14:56 ` Simon Horman
@ 2025-01-07 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-07 0:40 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, pabeni, netdev, horms, eric.dumazet
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 3 Jan 2025 10:11:48 +0000 you wrote:
> 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>
> ---
> net/hsr/hsr_main.h | 1 +
> net/hsr/hsr_slave.c | 4 +---
> 2 files changed, 2 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port()
https://git.kernel.org/netdev/net-next/c/4475d56145f3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-07 0:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 10:11 [PATCH net-next] net: hsr: remove one synchronize_rcu() from hsr_del_port() Eric Dumazet
2025-01-06 14:56 ` Simon Horman
2025-01-07 0:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).