public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] udp: Use WARN_ON_ONCE() in udp_read_skb()
@ 2022-09-21  0:59 Peilin Ye
  2022-09-22 14:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Peilin Ye @ 2022-09-21  0:59 UTC (permalink / raw)
  To: Eric Dumazet, David S. Miller, Hideaki YOSHIFUJI, David Ahern,
	Jakub Kicinski, Paolo Abeni
  Cc: Peilin Ye, Cong Wang, Kuniyuki Iwashima, Alexei Starovoitov,
	netdev, linux-kernel, Peilin Ye

From: Peilin Ye <peilin.ye@bytedance.com>

Prevent udp_read_skb() from flooding the syslog.

Suggested-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
---
 net/ipv4/udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index cd72158e953a..560d9eadeaa5 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -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)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] udp: Use WARN_ON_ONCE() in udp_read_skb()
  2022-09-21  0:59 [PATCH net] udp: Use WARN_ON_ONCE() in udp_read_skb() Peilin Ye
@ 2022-09-22 14:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-22 14:10 UTC (permalink / raw)
  To: Peilin Ye
  Cc: edumazet, davem, yoshfuji, dsahern, kuba, pabeni, peilin.ye,
	cong.wang, kuniyu, ast, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 20 Sep 2022 17:59:15 -0700 you wrote:
> From: Peilin Ye <peilin.ye@bytedance.com>
> 
> Prevent udp_read_skb() from flooding the syslog.
> 
> Suggested-by: Jakub Sitnicki <jakub@cloudflare.com>
> Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-22 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21  0:59 [PATCH net] udp: Use WARN_ON_ONCE() in udp_read_skb() Peilin Ye
2022-09-22 14:10 ` 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