Thread (21 messages) 21 messages, 4 authors, 2013-12-19

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

From: Jiri Kosina <hidden>
Date: 2013-12-16 13:02:05
Also in: lkml
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

On Fri, 27 Sep 2013, Joseph Salisbury wrote:
quoted
quoted
commit b1a1442a23776756b254b69786848a94d92445ba
Author: Jiri Kosina [off-list ref]
Date: Mon Jun 3 11:27:48 2013 +0200

    HID: core: fix reporting of raw events

Reverting this commit in v3.12-rc2 prevents the system from locking up, 
which happens when connecting a bluetooth trackpad.

Jiri, do you think we should revert this patch, or is there some further 
debugging/data collecting you would like to do?
Hi Joseph,

in this mail:

	Message-ID: [ref]
	Date: Tue, 24 Sep 2013 09:52:46 -0400

you said that reverting this commit doesn't prevent the lockups, so I am 
rather confused ... ?

Thanks,
The testing was invalid.  Reverting commit b1a1442 does resolve the bug
and stop the lockups.
Okay, I finally got some sense of this, sorry for the delay.

Could you please test with the patch below, instead of reverting 
b1a1442a23? Thanks a lot.


diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 253fe23..81eacd3 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1334,7 +1334,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
 		csize--;
 	}
 
-	rsize = ((report->size - 1) >> 3) + 1;
+	rsize = ((report->size - 1) >> 3) + 1 + (report->id > 0) + 7;
 
 	if (rsize > HID_MAX_BUFFER_SIZE)
 		rsize = HID_MAX_BUFFER_SIZE;
-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help