Prev: drivers/mtd/maps: Eliminate use after free
Next: lockdep: Fix redundant_hardirqs_on incremented with irqs enabled
From: Jiri Slaby on 27 Apr 2010 03:30 On 04/27/2010 12:34 AM, Alan Ott wrote: > Make hidraw not stick an extra byte on the beginning of an IN transfer > when a HID device contains multiple reports. .... > I have attached a patch which seems to take care of this problem. Please > let me know if I have completely misjudged the situation. Nope, your analysis is correct. It was introduced by me in 85cdaf524. I apparently forgot to change the hidraw case, so your fix is OK. > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > index 2e2aa75..0e4a6fb 100644 > --- a/drivers/hid/hid-core.c > +++ b/drivers/hid/hid-core.c > @@ -1043,13 +1043,8 @@ void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, > > if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) > hid->hiddev_report_event(hid, report); > - if (hid->claimed & HID_CLAIMED_HIDRAW) { > - /* numbered reports need to be passed with the report num */ > - if (report_enum->numbered) > - hidraw_report_event(hid, data - 1, size + 1); > - else > - hidraw_report_event(hid, data, size); > - } > + if (hid->claimed & HID_CLAIMED_HIDRAW) > + hidraw_report_event(hid, data, size); > > for (a = 0; a < report->maxfield; a++) > hid_input_field(hid, report->field[a], cdata, interrupt); -- js -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jiri Kosina on 27 Apr 2010 04:30
On Tue, 27 Apr 2010, Jiri Slaby wrote: > On 04/27/2010 12:34 AM, Alan Ott wrote: > > Make hidraw not stick an extra byte on the beginning of an IN transfer > > when a HID device contains multiple reports. > ... > > I have attached a patch which seems to take care of this problem. Please > > let me know if I have completely misjudged the situation. > > Nope, your analysis is correct. It was introduced by me in 85cdaf524. I > apparently forgot to change the hidraw case, so your fix is OK. Yeah, the analysis is correct, thanks a lot for catching this Alan! I have put Acked-by: Jiri Slaby <jslaby(a)suse.cz> to the patch and applied it. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |