summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPeilin Ye <peilin.ye@bytedance.com>2022-09-09 01:15:23 +0200
committerDavid S. Miller <davem@davemloft.net>2022-09-16 16:29:19 +0200
commit96628951869c0dedf0377adca01c8675172d8639 (patch)
tree24f2e8ce97dbcb842008eca8581b0eb0fbcb2c9d /net
parentMerge branch 'net-unsync-addresses-from-ports' (diff)
downloadlinux-96628951869c0dedf0377adca01c8675172d8639.tar.xz
linux-96628951869c0dedf0377adca01c8675172d8639.zip
tcp: Use WARN_ON_ONCE() in tcp_read_skb()
Prevent tcp_read_skb() from flooding the syslog. Suggested-by: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Peilin Ye <peilin.ye@bytedance.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 6cdfce6f2867..3488388eea5d 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1766,7 +1766,7 @@ int tcp_read_skb(struct sock *sk, skb_read_actor_t recv_actor)
return 0;
__skb_unlink(skb, &sk->sk_receive_queue);
- WARN_ON(!skb_set_owner_sk_safe(skb, sk));
+ WARN_ON_ONCE(!skb_set_owner_sk_safe(skb, sk));
copied = recv_actor(sk, skb);
if (copied >= 0) {
seq += copied;