From patchwork Mon Feb 8 18:06:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Bruno_Pr=C3=A9mont?= X-Patchwork-Id: 77793 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o18I5Krj008889 for ; Mon, 8 Feb 2010 18:07:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584Ab0BHSHU (ORCPT ); Mon, 8 Feb 2010 13:07:20 -0500 Received: from ppp-156-198.adsl.restena.lu ([158.64.156.198]:59362 "EHLO bonbons.gotdns.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752368Ab0BHSHT convert rfc822-to-8bit (ORCPT ); Mon, 8 Feb 2010 13:07:19 -0500 Received: from neptune.home (neptune.home [IPv6:2001:960:7ab:0:2c0:9fff:fe2d:39d]) by smtp.home (Postfix) with ESMTP id 1E0AA450F1; Mon, 8 Feb 2010 19:07:16 +0100 (CET) Date: Mon, 8 Feb 2010 19:06:49 +0100 From: Bruno =?UTF-8?B?UHLDqW1vbnQ=?= To: Jiri Kosina , Oliver Neukum , Stephen Rothwell , Marcel Holtmann , H Hartley Sweeten Cc: linux-usb@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: S2R resume crash in 2.6.33-rc7 - NULL pointer dereference in dev_get_drvdata() for usbhid Message-ID: <20100208190649.0ceea556@neptune.home> In-Reply-To: <20100208175145.606ca761@neptune.home> References: <20100208175145.606ca761@neptune.home> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; i686-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 08 Feb 2010 18:07:21 +0000 (UTC) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index e2997a8..d2f8eef 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -196,7 +196,7 @@ static void usbhid_mark_busy(struct usbhid_device *usbhid) static int usbhid_restart_out_queue(struct usbhid_device *usbhid) { - struct hid_device *hid = usb_get_intfdata(usbhid->intf); + struct hid_device *hid = usbhid->intf ? usb_get_intfdata(usbhid->intf) : NULL; int kicked; if (!hid) @@ -214,7 +214,7 @@ static int usbhid_restart_out_queue(struct usbhid_device *usbhid) static int usbhid_restart_ctrl_queue(struct usbhid_device *usbhid) { - struct hid_device *hid = usb_get_intfdata(usbhid->intf); + struct hid_device *hid = usbhid->intf ? usb_get_intfdata(usbhid->intf) : NULL; int kicked; WARN_ON(hid == NULL);