From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52308C15516 for ; Sun, 7 Mar 2021 13:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3768565134 for ; Sun, 7 Mar 2021 13:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231897AbhCGN6i (ORCPT ); Sun, 7 Mar 2021 08:58:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:43834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbhCGN6N (ORCPT ); Sun, 7 Mar 2021 08:58:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1985465115; Sun, 7 Mar 2021 13:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615125493; bh=KQyV3f0GCu6+wEuonWFPpqdiRkCvvvn6oUm7WcRVP94=; h=From:To:Cc:Subject:Date:From; b=sdF+TutJJaOf08FDpaaDIzLfqCvgms0FFtyxlARjadHrGe07jcnXSLnUxqITgSoJF CPLHccKQfRfsiPJEp7oyEaNbOA3UgC3x3JRuyeJXoU4FH9q/5bWnnv1tpvRCgjp1GJ /xw/0wt4r/fm8hGDSsBw3AgaHcTci6sDsDA1PV7JRgJU/tk4rp99UbT2J8/S5PoAha 3kZ01T9GZgiRVyCnhYh7hfjHG1SENlMlse+R2xH5xObAAYf/muJ9au98yHMjM8UuJ6 JmFa9/ZCkrXyhKMJByzYDe47W8TQ+IJvEvABE2NF6BRngUH7EahqKdoTJ+uG23pAMQ NOE/gEeP56RZw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dmitry Osipenko , Kees Cook , Sasha Levin Subject: [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message Date: Sun, 7 Mar 2021 08:58:07 -0500 Message-Id: <20210307135812.967702-1-sashal@kernel.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko [ Upstream commit 7db688e99c0f770ae73e0f1f3fb67f9b64266445 ] There is a quite huge "uncorrectable error in header" flood in KMSG on a clean system boot since there is no pstore buffer saved in RAM. Let's silence the redundant noisy messages by rate-limiting the printk message. Now there are maximum 10 messages printed repeatedly instead of 35+. Signed-off-by: Dmitry Osipenko Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210302095850.30894-1-digetx@gmail.com Signed-off-by: Sasha Levin --- fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 1f4d8c06f9be..4cb0478a17f8 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -246,7 +246,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz, pr_info("error in header, %d\n", numerr); prz->corrected_bytes += numerr; } else if (numerr < 0) { - pr_info("uncorrectable error in header\n"); + pr_info_ratelimited("uncorrectable error in header\n"); prz->bad_blocks++; } -- 2.30.1