diff options
author | Peilin Ye <peilin.ye@bytedance.com> | 2022-09-20 17:59:15 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-22 06:42:57 -0700 |
commit | db39dfdc1c3bd9da273902da12f01973792ff911 (patch) | |
tree | 7129758bd38d5708547ae003a08433d33d143761 /net | |
parent | c5da4b68d2a8592a7535bb9e4523158088a6538b (diff) | |
download | linux-db39dfdc1c3bd9da273902da12f01973792ff911.tar.bz2 |
udp: Use WARN_ON_ONCE() in udp_read_skb()
Prevent udp_read_skb() from flooding the syslog.
Suggested-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
Link: https://lore.kernel.org/r/20220921005915.2697-1-yepeilin.cs@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |