aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-03-02 12:58:50 +0300
committerKees Cook <keescook@chromium.org>2021-03-02 11:52:31 -0800
commit7db688e99c0f770ae73e0f1f3fb67f9b64266445 (patch)
tree577744a0d654b423c2af9bdd7e88af5549b09e42
parent9c7d83ae6ba67d6c6199cce24573983db3b56332 (diff)
downloadcryptodev-2.6-7db688e99c0f770ae73e0f1f3fb67f9b64266445.tar.gz
pstore/ram: Rate-limit "uncorrectable error in header" message
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 <digetx@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210302095850.30894-1-digetx@gmail.com
-rw-r--r--fs/pstore/ram_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index aa8e0b65ff1ae..fff363bfd4845 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++;
}