summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones <lee@kernel.org>2023-01-23 15:39:12 +0300
committerJiri Kosina <jkosina@suse.cz>2023-02-23 13:52:05 +0300
commit1c5d4221240a233df2440fe75c881465cdf8da07 (patch)
tree69d1d21f8c388b992b9180e5791aaa3e7f74204a
parentb1a37ed00d7908a991c1d0f18a8cba3c2aa99bdc (diff)
downloadlinux-1c5d4221240a233df2440fe75c881465cdf8da07.tar.xz
HID: uhid: Over-ride the default maximum data buffer value with our own
The default maximum data buffer size for this interface is UHID_DATA_MAX (4k). When data buffers are being processed, ensure this value is used when ensuring the sanity, rather than a value between the user provided value and HID_MAX_BUFFER_SIZE (16k). Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/uhid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index f161c95a1ad2..4588d2cd4ea4 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -395,6 +395,7 @@ static const struct hid_ll_driver uhid_hid_driver = {
.parse = uhid_hid_parse,
.raw_request = uhid_hid_raw_request,
.output_report = uhid_hid_output_report,
+ .max_buffer_size = UHID_DATA_MAX,
};
#ifdef CONFIG_COMPAT