Skip to content

Commit 7db688e

Browse files
digetxkees
authored andcommitted
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 <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9c7d83a commit 7db688e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/pstore/ram_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
246246
pr_info("error in header, %d\n", numerr);
247247
prz->corrected_bytes += numerr;
248248
} else if (numerr < 0) {
249-
pr_info("uncorrectable error in header\n");
249+
pr_info_ratelimited("uncorrectable error in header\n");
250250
prz->bad_blocks++;
251251
}
252252

0 commit comments

Comments
 (0)