Skip to contentSkip to conversation

udp: Use WARN_ON_ONCE() in udp_read_skb()

PATCH Applied Peilin Ye 2 participants 2 messages Sep 21, 2022 – Sep 22, 2022

Subsystems (3)
lore
Share & tools
lore

Peilin Ye

author
#0 lore raw

PATCH 1/1 udp: Use WARN_ON_ONCE() in udp_read_skb()

From: Peilin Ye <[email protected]>

Prevent udp_read_skb() from flooding the syslog.

---
 net/ipv4/udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/udp.c +1 -1
index cd72158e953a..560d9eadeaa5 100644
@@ -1821,7 +1821,7 @@ int udp_read_skb(struct sock *sk, skb_read_actor_t recv_actor)
 			continue;
 		}
 
-		WARN_ON(!skb_set_owner_sk_safe(skb, sk));
+		WARN_ON_ONCE(!skb_set_owner_sk_safe(skb, sk));
 		used = recv_actor(sk, skb);
 		if (used <= 0) {
 			if (!copied)
Signature · 1 line
2.20.1
#1 lore raw
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 20 Sep 2022 17:59:15 -0700 you wrote:

From: Peilin Ye <[email protected]>

Prevent udp_read_skb() from flooding the syslog.

[...]

Here is the summary with links:
- [net] udp: Use WARN_ON_ONCE() in udp_read_skb()

    https://git.kernel.org/netdev/net/c/db39dfdc1c3b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html