From: Lee Jones Date: Mon, 23 Jan 2023 12:39:12 +0000 (+0000) Subject: HID: uhid: Over-ride the default maximum data buffer value with our own X-Git-Tag: v6.1.21~316 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cd8ffa4880045ee829851dff1fba5fd2fae1524;p=platform%2Fkernel%2Flinux-starfive.git HID: uhid: Over-ride the default maximum data buffer value with our own commit 1c5d4221240a233df2440fe75c881465cdf8da07 upstream. 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 Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 2a918ae..59ac757 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -395,6 +395,7 @@ 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, }; EXPORT_SYMBOL_GPL(uhid_hid_driver);