Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1271555rwn; Thu, 8 Sep 2022 16:44:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR455ia3Lw/VGfMgwl6df6ITDAos/9OGFUVng3ZZXuhnOj7qjKj+iMNHhEsKXcZFx1BdWYUL X-Received: by 2002:a05:6512:1052:b0:498:f8d8:f74 with SMTP id c18-20020a056512105200b00498f8d80f74mr105675lfb.683.1662680693992; Thu, 08 Sep 2022 16:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662680693; cv=none; d=google.com; s=arc-20160816; b=xZ+7KtVRqh8DbzqKE5Liuyxmfbi8/ui657alT9Rv6mO6ZOTfpmPP1XzQN7t2isGAH/ KKRFJ45ZIs+hawRmGMBQsgtkUoaEvUn3OtJ42hJJYiTqn5+w3Q8oZ+98lpLlbGigoxzW YWAoneIyIR2izmmCvGtk1WGfZe6hnjjlY5T7pEW5KB+BFsZwCDS/4qa/EV5ylUFVhyYv +DlKuSAIQVd/uUYEnMobAGPWKQyaWlEGAtPh3E7qRflLRQNQ6LdJcbxkHNS3791pLtPN D5T/sdkI+A7FO5nGGpPsmUDEZrhLkiNdpiDsNp3Ed6BsEQ2o0rUcq37US2CUEGJeyJyc 5hXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MlhnWP7ey0aRvA15+oNfZLaURLs2EkPM1ZLYxQmv3zs=; b=ZyfDT1dnGCOsMqyqp7thHB+rKSgbAlVcp+7wXgxJeBBIUTEMd6sHEJ0RPWjA5sjJOg ZZ4zWW2N7qDu4fx1soiPDrhwgjhgmUcv/pWvfTAO5ogLif7BAIwCz+9RUB180tD2+sNw +LexUib8fDkC1BbmeKFZTW5nPrkSTlUj2sv0ATTso2Zoca/ApP2oIcdKD0C3y6CPidmW rVZgDv38NcKz/9lZpDKb9goS5qKwhlkkrHi127+Ql+rVcUxg7xJUCF4sFFRNLfKLhRqp 08HjjYlEmveGQSNJjHrrTea2MyjslCCZUOSXmbz6PCSltaeIC6UHfj6CsaMdCgo0A0TE ATOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ykw6VUj1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a2e9f41000000b00265eb2bd49dsi118994ljk.71.2022.09.08.16.44.22; Thu, 08 Sep 2022 16:44:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ykw6VUj1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbiIHXP6 (ORCPT + 99 others); Thu, 8 Sep 2022 19:15:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiIHXP4 (ORCPT ); Thu, 8 Sep 2022 19:15:56 -0400 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E78A7B1B8D; Thu, 8 Sep 2022 16:15:55 -0700 (PDT) Received: by mail-qk1-x72a.google.com with SMTP id x3so58512qkn.5; Thu, 08 Sep 2022 16:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=MlhnWP7ey0aRvA15+oNfZLaURLs2EkPM1ZLYxQmv3zs=; b=Ykw6VUj12Epd82J0HG6/59kvFPyl6clziGlDNs/83MyQX7vSGfllr9cWtRe0prRoD9 LyqtDnGEk4mJP4qQTSSNZQJhBKaYKxNoR7wKtHYqBeqZTM6+1cGLc42yJLDsLnVGddrQ ETtL3H11txbATZJMiO2DUDGBLrBfsoIMHdUiBZLm95wY6SApjIt+vBleyMch1f8NVVvD 9SMjRr2QqBtIE6bdriqRUqxhWhcf0H0maazgTvFtZTLcmhBlqjAHyCIOHfmlg1/FoAfz VIijLWB5Ye7lNdI2LESOJLVNSbgUuVa+grm+ZQE5GiO1laLJUNbqlSJcrXcUlXLz2TtR G7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=MlhnWP7ey0aRvA15+oNfZLaURLs2EkPM1ZLYxQmv3zs=; b=uYbFq9ZTTjVOmxX9HYAGIaAR8xnbSlU52VpprZokMa+2AayRVD8CVPiY5PGsiCP0JA YzMTA/paofmeqmohRw3GOa9zTLlbW+PvNmrjE49yqUW2HyqBmUo16nf9f5a8aVDlWnFR cF2zZvEIkJFeQF+t3WiqDo5ItZ5mv7V8hM5+VljSC/mMOE5OG6KXB1yhXkSoc9iv/4ZQ 9sXQTGAsT9Jo05g5MkvJj0fjkQYC3Db1/Ivi2K6i0CkwH4D3PJde4Pu3+ngsHjpnLb5x A+NxgDzh5Ndyhhvy8+MELvKHmtsGVC7ZH2//M6MuXNrgTkp2PUmViebkNYOlv9G09cHO ooyg== X-Gm-Message-State: ACgBeo2XpQ8j4zq5+z4DjHwdKtqSrZtta4RL61+XkZurvUdAz1rg2yKh r9xAY/BqEJczqZHaxNPQ5dQ9oR2pgA== X-Received: by 2002:a05:620a:102e:b0:6cb:d59c:812f with SMTP id a14-20020a05620a102e00b006cbd59c812fmr3278843qkk.232.1662678955062; Thu, 08 Sep 2022 16:15:55 -0700 (PDT) Received: from bytedance.attlocal.net ([130.44.215.155]) by smtp.gmail.com with ESMTPSA id n72-20020a37274b000000b006cbc40f4b36sm92134qkn.39.2022.09.08.16.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 16:15:54 -0700 (PDT) From: Peilin Ye To: Eric Dumazet , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni Cc: Peilin Ye , Cong Wang , Jakub Sitnicki , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Peilin Ye Subject: [PATCH net] tcp: Use WARN_ON_ONCE() in tcp_read_skb() Date: Thu, 8 Sep 2022 16:15:23 -0700 Message-Id: <20220908231523.8977-1-yepeilin.cs@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <87r1169hs2.fsf@cloudflare.com> References: <87r1169hs2.fsf@cloudflare.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peilin Ye Prevent tcp_read_skb() from flooding the syslog. Suggested-by: Jakub Sitnicki Signed-off-by: Peilin Ye --- net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 8230be00ecca..9251c99d3cfd 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; -- 2.20.1