]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
HID: core: fix dmesg flooding if report field larger than 32bit
authorJoshua Clayton <stillcompiling@gmail.com>
Wed, 30 Oct 2019 07:16:52 +0000 (15:16 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:02 +0000 (18:47 +0100)
commit83dd408acbb04b982baf97aa18ce69ce80147336
treed1086486976fd6de9feb3d537d6c39d9f0a91218
parent78bff1007dce9e7c9ed3423f405cca4009f4ff26
HID: core: fix dmesg flooding if report field larger than 32bit

BugLink: https://bugs.launchpad.net/bugs/1850600
Only warn once of oversize hid report value field

On HP spectre x360 convertible the message:
hid-sensor-hub 001F:8087:0AC2.0002: hid_field_extract() called with n (192) > 32! (kworker/1:2)
is continually printed many times per second, crowding out all else.
Protect dmesg by printing the warning only one time.

The size of the hid report field data structure should probably be increased.
The data structure is treated as a u32 in Linux, but an unlimited number
of bits in the USB hid spec, so there is some rearchitecture needed now that
devices are sending more than 32 bits.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
(cherry picked from commit 0af10eed9b7308187c7865024248b2a2a5aa382a)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hid/hid-core.c