From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B78E13438A6; Thu, 2 Jul 2026 16:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009641; cv=none; b=sMxgQFhEvwYGnLiwpvgImY8uZCbVTlqZ2k5mLOhkHk0wrL0jILE+VRDLetsGy5DR3TGmE1T62HFudA6l7hrW4DoH2FBiQeXWb8IY03riTAemIAUHcpcUaijncre3+huUiIAntzlr1OgfJeC54MIrTetlASbRL47OzzqN2DtNEcM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009641; c=relaxed/simple; bh=gIjx9j+jHUI3Q5rYWzyk9Bs9hqhsePkWbuNvgw/wjfQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O02d+PabOnQY1i7aEqZNKnb97jGvbVGBT1qSB0XGKEowkoFXc+xL7+RP+OniU9Y0Cerw3vm3lqwLn2PqSZL2b+7TCrO6Lt1hRXO277XDusbpLbT3hmM8hJgD/RqiNlBryfhYe1eYmRU2xSGWWDHrYNZUP64odM7sNRVekjfpINg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Cb6jS28Q; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Cb6jS28Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBB421F000E9; Thu, 2 Jul 2026 16:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783009636; bh=jeKLN3VgHt1925Umd6SzZLaTAYO+vUS7luG38THmkn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Cb6jS28QJuQff+amb0/eFa3QvF5tlmqeqc7P5OMnE0q7jizecgrxz+Q2+0l48r2+i MIRuWdiPw86QvFnDeqQZMFAKA/R3U1W+nBfEvKi2z9pzWEyzzNIH6GpJsT/x2Flb+6 tUQbag0VaWsq91r0ChKa/UJvndy/7TUsLYhTuHiU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jamal Hadi Salim , Simon Horman , Pedro Tammela , "David S. Miller" , Wentao Guan , Sasha Levin Subject: [PATCH 5.15 03/95] net/sched: act_pedit: rate limit datapath messages Date: Thu, 2 Jul 2026 18:19:06 +0200 Message-ID: <20260702155109.277008433@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260702155109.196223802@linuxfoundation.org> References: <20260702155109.196223802@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pedro Tammela [ Upstream commit e3c9673e2f6e1b3aa4bb87c570336e10f364c28a ] Unbounded info messages in the pedit datapath can flood the printk ring buffer quite easily depending on the action created. As these messages are informational, usually printing some, not all, is enough to bring attention to the real issue. Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller (cherry picked from commit e3c9673e2f6e1b3aa4bb87c570336e10f364c28a) Signed-off-by: Wentao Guan Signed-off-by: Sasha Levin --- net/sched/act_pedit.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 999ac09e33d5dc..345fd5645e1dd2 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -429,8 +429,8 @@ static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a, u8 *d, _d; if (!offset_valid(skb, hoffset + tkey->at)) { - pr_info("tc action pedit 'at' offset %d out of bounds\n", - hoffset + tkey->at); + pr_info_ratelimited("tc action pedit 'at' offset %d out of bounds\n", + hoffset + tkey->at); goto bad; } d = skb_header_pointer(skb, hoffset + tkey->at, @@ -440,14 +440,13 @@ static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a, offset += (*d & tkey->offmask) >> tkey->shift; if (offset % 4) { - pr_info("tc action pedit offset must be on 32 bit boundaries\n"); + pr_info_ratelimited("tc action pedit offset must be on 32 bit boundaries\n"); goto bad; } } if (!offset_valid(skb, hoffset + offset)) { - pr_info("tc action pedit offset %d out of bounds\n", - hoffset + offset); + pr_info_ratelimited("tc action pedit offset %d out of bounds\n", hoffset + offset); goto bad; } @@ -464,8 +463,7 @@ static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a, val = (*ptr + tkey->val) & ~tkey->mask; break; default: - pr_info("tc action pedit bad command (%d)\n", - cmd); + pr_info_ratelimited("tc action pedit bad command (%d)\n", cmd); goto bad; } -- 2.53.0