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 5CC6534D91F; Thu, 2 Jul 2026 16:30:36 +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=1783009837; cv=none; b=JZlKk3FnoUdqSiQEMRu/S4Tt5SjaLxOpLLUzP2y63vic5SGWZC4m7RkmtGM9NrPradTo2mWyCJJFhwsm6a/C1GfDic0OgfZTMR5UwKuVQQV1Jw7TlhYeR1or93wosfD6IleXn9CdJRTIXwMBatgVnrPfo1wJGTyhWmMAVju4ECg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009837; c=relaxed/simple; bh=oM1CRDQk5cuyw4KmvkzR2p2WFUcE9fMgEVR9Iq/ocVs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z6g/c4mPbGtV8CjxGZ8efX35ni9f42BhOfrdZKMamtt/nD7cjKC+B12/AK74w2VeasbtH7SR6yPmz/yG/6Zaj3e682QrbWs76//9s4CXTKOVvEBgmNfuARxqeTUTd7rkDIqZgoeKtAMt5Al0NwOOUefwrG+a4cKbZSOknZNUYCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=saQjCj1k; 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="saQjCj1k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9FC91F000E9; Thu, 2 Jul 2026 16:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783009836; bh=0QyboJ3Yt19yA8rAJEX3ysuqYAEVNIXFUqGDTXYr5oo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=saQjCj1kdpXYR3suX7Ks3tIaPZKZYgWe38f1wXxQAihaSdIvxPv7U9Y0nH9yB3myk +ezMIpgwKhhi1Vg6Jf5DUuuyuYEGhcrSoMt9tMrdFkDcWFOPALh48vra2hSFhksfXo X0+Uf449R+orNA6q4aPSPArszWwTKR4Pu+ntstOM= 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 6.1 003/129] net/sched: act_pedit: rate limit datapath messages Date: Thu, 2 Jul 2026 18:18:42 +0200 Message-ID: <20260702155112.235010288@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260702155112.163984240@linuxfoundation.org> References: <20260702155112.163984240@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 6.1-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 2bdc44efee779a..7ba460fda1f4e9 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