Skip to content

Commit

Permalink
pstore/ram: Rate-limit "uncorrectable error in header" message
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dmitry Osipenko authored and Kees Cook committed Mar 2, 2021
1 parent 9c7d83a commit 7db688e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/pstore/ram_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down

0 comments on commit 7db688e

Please sign in to comment.