Message ID | 20210901122302.256387763@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp214886jai; Wed, 1 Sep 2021 05:40:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqSUVLSi7018X109Wx7ET9dO8bahn6TcRchyhSsauUIL9szc4BFseA5hvL0MrF4gNo5tEa X-Received: by 2002:a5e:d712:: with SMTP id v18mr26577744iom.65.1630500014070; Wed, 01 Sep 2021 05:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630500014; cv=none; d=google.com; s=arc-20160816; b=TEM00mLUMR7Obk3CNm4iWmliJljYdDhpTxpxhfHSa3gNfIbOV6DQr6GAvdNajs9Eik bhRuhOSkblz/LJ+hvmNnUq5ZjLaWt+BQL8gWFjxOanUSGIJ8mwu9Tf7Fy1F37I73juml 44n+JTB2JZ2Fie94aqYyzAey+PIbfcO9WLhe0JVSgk0qxTIYm7u5DnsIzYbJ3q0TnTCt bmLYx84JKK82KNIE26aoiHvX+V9K1OCbgdBfQ6qZWsCpPOvT7Wh0U7pXACUQbDMNlbEs H21507nkqYA0yRAgJ7Hunr2s5XnHTuaMapl3zfVpSTtWpCzAATJnBwTCdPLZzcQ751fo xXdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aYxuaaTErQMSGtdY2D9LDRphOGOu6EmOqwajXXVAGqc=; b=fTPiM/E7m/zCsCS/KPLLhemsCpF3WoMMv2aCQay3LR2yD2pyMpgtIn/lDEu/Riv64g mEvWewXVn4FoB+khxjgCmO1gy8oU0adwNqR8ZiDw0b/bYokXltxnMIee4yBQEBrSpvP4 iilOqu0g61hcTt3OYimYimAcmT4Tq0EPCbTEOhyACCvhfupT0hzjRKF0BPcJspxJ0+Xe W87ZuZbEr33QP0vKWEbaEWxu+et2NVp9tQlQmsIqv88U5C2ufMduB27KXG8WV1klRtlF JNdbrb0CPZJtd9SI2j1Os1ds+YTUAaIQ5YKedb1KTavqV1/FFr7LJ6IpPNvJ5VPmrN17 EK3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rp2xnDC5; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j9si20349837ilr.97.2021.09.01.05.40.13; Wed, 01 Sep 2021 05:40:14 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rp2xnDC5; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343585AbhIAMlC (ORCPT <rfc822;semen.protsenko@linaro.org> + 11 others); Wed, 1 Sep 2021 08:41:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:44058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245544AbhIAMiz (ORCPT <rfc822;stable@vger.kernel.org>); Wed, 1 Sep 2021 08:38:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3543C6115C; Wed, 1 Sep 2021 12:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499697; bh=garZmkr3x6ZGvRxB0Wobo7VLCt6GC7nXcCcwN5F+RYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rp2xnDC5j1PTIiQxVajd+CRamoruThgdlcG03TIP2W13kQmuwSPqSpUL2v2tpa+bH YQ2gNULIFRUPo0dM4WjRDcLu28bG6yThlBdRHjm2fM/vzNkuXIl/MxGpnE2sttj7BZ 4vYp4alD3D26YF5FPcCIg+QBEJxqt2osVsmOh7A8= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Thinh Nguyen <Thinh.Nguyen@synopsys.com>, Jerome Brunet <jbrunet@baylibre.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 5.10 050/103] usb: gadget: u_audio: fix race condition on endpoint stop Date: Wed, 1 Sep 2021 14:28:00 +0200 Message-Id: <20210901122302.256387763@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122300.503008474@linuxfoundation.org> References: <20210901122300.503008474@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c index 908e49dafd62..95605b1ef4eb 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -334,8 +334,6 @@ static inline void free_ep(struct uac_rtd_params *prm, struct usb_ep *ep) if (!prm->ep_enabled) return; - prm->ep_enabled = false; - audio_dev = uac->audio_dev; params = &audio_dev->params; @@ -353,11 +351,12 @@ static inline void free_ep(struct uac_rtd_params *prm, struct usb_ep *ep) } } + prm->ep_enabled = false; + if (usb_ep_disable(ep)) dev_err(uac->card->dev, "%s:%d Error!\n", __func__, __LINE__); } - int u_audio_start_capture(struct g_audio *audio_dev) { struct snd_uac_chip *uac = audio_dev->uac;