]> git.proxmox.com Git - mirror_ubuntu-bionic-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 18:04:40 +0000 (19:04 +0100)
commit7acf20a89b9372d6c7a1392cecec7f447cad40e8
tree008533321edb9c2a02c6488ac482fad86416aee5
parent4383dec7b72601135621e54a4e47210bec0b339d
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