Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3482409imu; Sun, 11 Nov 2018 16:06:43 -0800 (PST) X-Google-Smtp-Source: AJdET5cJKet/q2KznM8Hooy0QqCSkOKF53XZxiZBtGb2oM0f2wjSBCTTa4EtpY2YTB04nlSichuN X-Received: by 2002:a63:e516:: with SMTP id r22mr15884016pgh.256.1541981203174; Sun, 11 Nov 2018 16:06:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981203; cv=none; d=google.com; s=arc-20160816; b=b+J185t5sA0fzM/MH4vRU+7pBE88p5aPB792fEjTs8457c/ySwxfbzzjpiPgndLbD3 wCqwNquV1vR8i4Gf/PcG2VEKjK8kLIr4TaAbC4DssQiokQZoqnoqFpLI7DvbmwyCYGGN /AQfPHXU5+TDtsD46CXOert0oKALhBdrET4UyGsfs+stw85mOSxy0vtBaR6NVOIExAGr Sfeox7VONo7htUkJzxaST15Z1Zx2X8F3N2zFPYvQtPRqrt0O74Hcr3OkAyAZpOsajlZG gehksg+XvTI8S+fG+KOY9hEakMbfmul1ZuzGvVezEYtSoPSNgILux97Mk0pV1se2gimi A2Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mmgeP3uQblKxDIGtztZLHSHNhdoPWZcAu7NWNQ/Bg6w=; b=N9nyhi8sBvtDWNpBM4J9gqnzOZwu3iKggICq0GgYxDOQhJGdLCkavNUWA3GZwwaSLL t+b0r9hoFpSlQkMkCLu8qJ382vm69sHDQtxQN1jLQQfF0YlQyIk/sgEFU0fwYWzXtItE X+lk6iKlatrhjp2z8oD8zIKaUZ3atEQ3Jw9zV8CP0gILrKxaRYBagtqtLLSDHX3dkivP dYfZPIPSA1Iga9V4MKfH3hojtjyiqk6lTeLQ3dvTaJLncp9EYvqZmiS7GlY9dwMNawnN OQyYQo1Mx9Yw4nCjD9b+Vq/2ArEKTjC1glv8+o8jPUdTNmQ4n2gytZ5qdZT8DRldBJ2z pXPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1mEX1hwh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 188-v6si16226595pfd.19.2018.11.11.16.06.28; Sun, 11 Nov 2018 16:06:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1mEX1hwh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731898AbeKLIRm (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731882AbeKLIRm (ORCPT ); Mon, 12 Nov 2018 03:17:42 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F3BF21527; Sun, 11 Nov 2018 22:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975266; bh=JPUjt8Vzw/0Uv/wS2amLyYG2FuCufSl+FzUiYb8G3RI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1mEX1hwhkXhlaJuASMQ1xYEteOXbNmxxBgSmWjOg9l+pmHsuZ2jo9DMleYkJQXfA5 b4lac/JfR8KLEeOubwHLXgiu560H0H8ioJ4UV1WsFrLR5C5zK7NNSghP8gtz2xFnOu uIGfq5h5xMh9FH86EmpSvWqh/6CQ66uI7V7TxSoE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Artur Petrosyan , Minas Harutyunyan , Fabrice Gasnier , Amelie Delaunay , Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 158/361] usb: dwc2: fix call to vbus supply exit routine, call it unlocked Date: Sun, 11 Nov 2018 14:18:25 -0800 Message-Id: <20181111221642.688798207@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fabrice Gasnier [ Upstream commit 5aa678c7fd5371769efde30763fb43a43a118cd0 ] dwc2_vbus_supply_exit() may call regulator_disable(). It shouldn't be called with interrupts disabled as it might sleep. This is seen with DEBUG_ATOMIC_SLEEP=y. Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc2/hcd.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4482,7 +4482,9 @@ static int _dwc2_hcd_suspend(struct usb_ hprt0 |= HPRT0_SUSP; hprt0 &= ~HPRT0_PWR; dwc2_writel(hsotg, hprt0, HPRT0); + spin_unlock_irqrestore(&hsotg->lock, flags); dwc2_vbus_supply_exit(hsotg); + spin_lock_irqsave(&hsotg->lock, flags); } /* Enter partial_power_down */