Skip to content

Commit c2ca42f

Browse files
author
Benjamin Tissoires
committed
HID: core: do not bypass hid_hw_raw_request
hid_hw_raw_request() is actually useful to ensure the provided buffer and length are valid. Directly calling in the low level transport driver function bypassed those checks and allowed invalid paramto be used. Reported-by: Alan Stern <[email protected]> Closes: https://lore.kernel.org/linux-input/[email protected]/ Cc: [email protected] Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 0d0777c commit c2ca42f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/hid/hid-core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,8 +1996,7 @@ int __hid_request(struct hid_device *hid, struct hid_report *report,
19961996
if (reqtype == HID_REQ_SET_REPORT)
19971997
hid_output_report(report, data_buf);
19981998

1999-
ret = hid->ll_driver->raw_request(hid, report->id, buf, len,
2000-
report->type, reqtype);
1999+
ret = hid_hw_raw_request(hid, report->id, buf, len, report->type, reqtype);
20012000
if (ret < 0) {
20022001
dbg_hid("unable to complete request: %d\n", ret);
20032002
goto out;

0 commit comments

Comments
 (0)