Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] HID: core: demote data shortness warning to debug level
@ 2026-05-23 10:38 Matteo Croce
  2026-05-23 10:45 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Matteo Croce @ 2026-05-23 10:38 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Lee Jones
  Cc: linux-input, linux-kernel, Matteo Croce

From: Matteo Croce <teknoraver@meta.com>

Commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing
bogus memset()") changed the log level of the short report message from
debug to warning, flooding syslog on systems with devices that
regularly send short reports, in my case an UPS:

    $ dmesg |grep -c 'Event data for report .* was too short'
    35

Demote it back to debug level.

Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Signed-off-by: Matteo Croce <teknoraver@meta.com>
---
 drivers/hid/hid-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 41a79e43c82b..76cfed8b93c1 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2050,8 +2050,8 @@ int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *
 		return 0;
 
 	if (unlikely(bsize < csize)) {
-		hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %zu)\n",
-				     report->id, csize, bsize);
+		hid_dbg_ratelimited(hid, "Event data for report %d is incorrect (%d vs %zu)\n",
+				    report->id, csize, bsize);
 		return -EINVAL;
 	}
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-23 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-23 10:38 [PATCH] HID: core: demote data shortness warning to debug level Matteo Croce
2026-05-23 10:45 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox