diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-11-29 22:38:55 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-20 13:11:15 +0100 |
commit | 7d12970f1746d47155f97113ac48b81fd8af8640 (patch) | |
tree | e6c10e9443527ab36b8f091ea0766dcdb3dd5755 /drivers/firmware/dmi-sysfs.c | |
parent | 11819ed2b70da94acc41fec34178a011c4d3d25d (diff) | |
download | linux-stable-7d12970f1746d47155f97113ac48b81fd8af8640.tar.gz linux-stable-7d12970f1746d47155f97113ac48b81fd8af8640.tar.bz2 linux-stable-7d12970f1746d47155f97113ac48b81fd8af8640.zip |
firmware: dmi-sysfs: make pr_info messages rate limited
Currently if a process repeat repeatedly reads the dmi sysfs raw event log
/sys/firmware/dmi/entries/15-0/system_event_log/raw_event_log when GPNV
support is missing or using an unknown access method the kernel log gets
spammed with info messages. Make the messages rate limited to reduce the
message spamming. Triggered when running sudo stress-ng --sysfs -t 5m.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221129223855.1005674-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware/dmi-sysfs.c')
-rw-r--r-- | drivers/firmware/dmi-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c index 66727ad3361b..9b6ce172175c 100644 --- a/drivers/firmware/dmi-sysfs.c +++ b/drivers/firmware/dmi-sysfs.c @@ -418,10 +418,10 @@ static ssize_t dmi_sel_raw_read_helper(struct dmi_sysfs_entry *entry, return dmi_sel_raw_read_phys32(entry, &sel, state->buf, state->pos, state->count); case DMI_SEL_ACCESS_METHOD_GPNV: - pr_info("dmi-sysfs: GPNV support missing.\n"); + pr_info_ratelimited("dmi-sysfs: GPNV support missing.\n"); return -EIO; default: - pr_info("dmi-sysfs: Unknown access method %02x\n", + pr_info_ratelimited("dmi-sysfs: Unknown access method %02x\n", sel.access_method); return -EIO; } |