From patchwork Mon Dec 16 13:01:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Kosina X-Patchwork-Id: 3354091 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 762FCC0D4A for ; Mon, 16 Dec 2013 13:02:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D4ED20119 for ; Mon, 16 Dec 2013 13:02:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F8CD200F3 for ; Mon, 16 Dec 2013 13:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754030Ab3LPNCB (ORCPT ); Mon, 16 Dec 2013 08:02:01 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55328 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753914Ab3LPNCB (ORCPT ); Mon, 16 Dec 2013 08:02:01 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5BD91AAC7; Mon, 16 Dec 2013 13:02:00 +0000 (UTC) Date: Mon, 16 Dec 2013 14:01:57 +0100 (CET) From: Jiri Kosina To: Joseph Salisbury cc: Dan Carpenter , thomas@m3y3r.de, list@osuosl.org, Haiyang Zhang , LKML , open@osuosl.org, HID CORE LAYER , devel@linuxdriverproject.org Subject: Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup In-Reply-To: <52459942.3020600@canonical.com> Message-ID: References: <5237430B.5040009@canonical.com> <20130916203824.GP25896@mwanda> <52376ED9.5080208@canonical.com> <20130916210503.GQ25896@mwanda> <5237A5D5.8010006@canonical.com> <52432152.3030100@canonical.com> <52459942.3020600@canonical.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 27 Sep 2013, Joseph Salisbury wrote: > >> commit b1a1442a23776756b254b69786848a94d92445ba > >> Author: Jiri Kosina > >> 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: <5241992E.3090805@canonical.com> > > 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;