Message ID | 1442952651-4341-2-git-send-email-amstan@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7B1F8BEEC1 for <patchwork-linux-rockchip@patchwork.kernel.org>; Tue, 22 Sep 2015 20:11:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DB4A20A13 for <patchwork-linux-rockchip@patchwork.kernel.org>; Tue, 22 Sep 2015 20:11:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B900209F8 for <patchwork-linux-rockchip@patchwork.kernel.org>; Tue, 22 Sep 2015 20:11:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZeTud-0001ho-91; Tue, 22 Sep 2015 20:11:39 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZeTuW-0001dA-BQ for linux-rockchip@lists.infradead.org; Tue, 22 Sep 2015 20:11:33 +0000 Received: by padhy16 with SMTP id hy16so18407350pad.1 for <linux-rockchip@lists.infradead.org>; Tue, 22 Sep 2015 13:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G1U0Z0zP1lnE98ZT/CmQVVzVZMfLhERAxjO1qr5UVU8=; b=k6KbUcX8Y4yHUlX0Enlfm2CrtYOJT+/JBBL6PrBTlop2x3yWUqT/KciD6dA1yFD3I+ X2AkVbQQvBi6D6usskQxAwP5W36WCL/qU/hEhUYGbHsrqhvjHpcXNlLjuftsCpMy/YC6 xeUSlRzQdT9+f5OEVUu+USfw+JFS7JCEkAtcU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G1U0Z0zP1lnE98ZT/CmQVVzVZMfLhERAxjO1qr5UVU8=; b=URuUnHGNIZAcvploSs7U139ux0UMs+BkMCsEipnbtp37X0OhIxLq/P1QqAjxopCtYw R7vW/32PzAx0/9oy2OKXTHJ9pai6uXyKb5jGjsHTd/ARqVh4lkMW1Y11T7+GMTnshNBi cm9BkJb2HjdA594BCfxGzJVj3F3kjgeJEdH3GQExaZS3j+VQ97CIW1KgpRqN6Aa6nI7D FJiQGvg3hZjEFcb022FJgNfFh2QhiiwUIfb+1UhbnJAwSb0amhXec3EYDTiUM67ozox0 p3v1bklCjy7TSvFNkXX25W2ER+JEVwn8q7TblxlowTZzloshdMmPYYqHVr3CAHRRGlSm E2zg== X-Gm-Message-State: ALoCoQlLkqp5swKGGTCZQ0A1nbNHF4qaJ/4A4J9J0+gYEKx7OIGhnD4szVJE79QHwLXyyOYUK/Tn X-Received: by 10.68.202.9 with SMTP id ke9mr33249797pbc.85.1442952671733; Tue, 22 Sep 2015 13:11:11 -0700 (PDT) Received: from amstan.mtv.corp.google.com ([100.96.109.27]) by smtp.gmail.com with ESMTPSA id un2sm3856866pac.28.2015.09.22.13.11.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Sep 2015 13:11:11 -0700 (PDT) From: Alexandru M Stan <amstan@chromium.org> To: John Youn <johnyoun@synopsys.com>, Paul Zimmerman <paulz@synopsys.com> Subject: [PATCH] usb: dwc2: Fix NULL qh in dwc2_queue_transaction Date: Tue, 22 Sep 2015 13:10:51 -0700 Message-Id: <1442952651-4341-2-git-send-email-amstan@chromium.org> X-Mailer: git-send-email 2.6.0.rc0.131.gf624c3d In-Reply-To: <1442952651-4341-1-git-send-email-amstan@chromium.org> References: <1442952651-4341-1-git-send-email-amstan@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150922_131132_443612_D9907C5A X-CRM114-Status: GOOD ( 11.96 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms <linux-rockchip.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-rockchip/> List-Post: <mailto:linux-rockchip@lists.infradead.org> List-Help: <mailto:linux-rockchip-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=subscribe> Cc: Heiko Stuebner <heiko@sntech.de>, gregkh@linuxfoundation.org, Jonathan Dixon <joth@chromium.org>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson <dianders@chromium.org>, linux-rockchip@lists.infradead.org, Mian Yousaf Kaukab <yousaf.kaukab@intel.com>, linux-arm-kernel@lists.infradead.org, Alexandru M Stan <amstan@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" <linux-rockchip-bounces@lists.infradead.org> Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 |
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index f845c41..d745128 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -1004,7 +1004,7 @@ static int dwc2_queue_transaction(struct dwc2_hsotg *hsotg, { int retval = 0; - if (hsotg->core_params->dma_enable > 0) { + if (hsotg->core_params->dma_enable > 0 && chan->qh) { if (hsotg->core_params->dma_desc_enable > 0) { if (!chan->xfer_started || chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
When a usb device disconnects in a certain way, dwc2_queue_transaction still gets called after dwc2_hcd_cleanup_channels. dwc2_hcd_cleanup_channels does "channel->qh = NULL;" but dwc2_queue_transaction still wants to dereference qh. This adds a check for a null qh. Signed-off-by: Alexandru M Stan <amstan@chromium.org> --- drivers/usb/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)