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

authored by Dmitry Osipenko and committed by Kees Cook 7db688e9 9c7d83ae

Changed files
+1 -1
fs
pstore
+1 -1
fs/pstore/ram_core.c
··· 246 246 pr_info("error in header, %d\n", numerr); 247 247 prz->corrected_bytes += numerr; 248 248 } else if (numerr < 0) { 249 - pr_info("uncorrectable error in header\n"); 249 + pr_info_ratelimited("uncorrectable error in header\n"); 250 250 prz->bad_blocks++; 251 251 } 252 252