diff options
author | Lee Jones <lee@kernel.org> | 2023-01-23 15:39:12 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-02-23 13:52:05 +0300 |
commit | 1c5d4221240a233df2440fe75c881465cdf8da07 (patch) | |
tree | 69d1d21f8c388b992b9180e5791aaa3e7f74204a | |
parent | b1a37ed00d7908a991c1d0f18a8cba3c2aa99bdc (diff) | |
download | linux-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.c | 1 |
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 |