Message ID | 20210901122254.280454719@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp209610jai; Wed, 1 Sep 2021 05:33:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQRgCn4PfmKSNgIrGEIdwuvCxiUPtVotUMw8Kxxn1oewdvtNNM8jYrvSlXHkKXdHyTlxig X-Received: by 2002:a05:6e02:1b81:: with SMTP id h1mr25273416ili.240.1630499631953; Wed, 01 Sep 2021 05:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630499631; cv=none; d=google.com; s=arc-20160816; b=EP1it68gNSTCJkbLV/x7kwYQkoCM8sZ7ph6BzsZcEikCeN+z7Blxu9YmLI7HgYSU/u 4rKOLJzNLc5UzYxrkdvqosolhLnkGdwuuSsDtYGXVqqeUeFIRgfDnBjUoozH9v3HysqL sgS/5KfsMSy5pYz9cfcod2cE+dSEtRXABNtC5Pqt9bJr8InbzWcPO0fIHLPIXWXAX4iR 9taxBbxXPAVPVkZNWmS3asdorAH7DfmLrIdu9+ehvn0+3Q4qgvtvM3HzN5vDeJFVGMC6 F+cL9O2ecyppSmwxLX1xcDnvr1eDSjLSO4Lm1P5kBYKa+0lhuWq89D/yh5lTG/Q/SsIk 3soQ== 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=AIz9mlPvUCFRVnl8P2lhO71RT/6yxkJQBPo5VPd5TpI=; b=DY0BSgHL0IbyB2uApdv5bekajAzHmQvNb+/XpaWLkZeijDs/EmSLBp3r2DgJScLBhv WUr81fEmuK/4c0QUNP8LzNCVuoMxJWDRY/e96zwpqX5lO9nhv792lpUNgCG6OneEwEL0 5dfS/D6VAZSswLwjh7ABfz5F7PA149Pi2tm2cDN6WlvUHchQFgFyCJ13sLmE5FMtHx73 DfOAm/n8nMtk8JOMHc54vvJqgA2Pk4Lk37+CpEgmlpFtxElUoRoIz0tda7UwXdPVDqdr cM5ji0t5xjYUlbJ0KZxQdXF2MegsgtgnlDPhzva9fPOebUkYi8r4D0Mg+0Bsn+rSAEyh Wv6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ewxbcf/I"; 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 t10si16102242iof.42.2021.09.01.05.33.51; Wed, 01 Sep 2021 05:33:51 -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="ewxbcf/I"; 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 S244798AbhIAMeq (ORCPT <rfc822;semen.protsenko@linaro.org> + 11 others); Wed, 1 Sep 2021 08:34:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:34618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343493AbhIAMdT (ORCPT <rfc822;stable@vger.kernel.org>); Wed, 1 Sep 2021 08:33:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D17BA6109E; Wed, 1 Sep 2021 12:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499509; bh=TQnjmA9IY4rpM2sotE7Dff9Feuq9Kflv+0/e3DRW+Cc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ewxbcf/Ifj9QrKvy5f87BHxYdP5SD2US9x9nqfUgsACGVqpkiaEHpqX4mZAvlXsdC IoUOt9u5DikrOfIP8JkPV8DRkIXW2OT2cnr5v1gZagZXJ7vu4WQwXWatoAKbh9xzI6 A4sq038EH3UU1Lvwr9Qw9QEjww7lRloSMtH84578= 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.4 26/48] usb: gadget: u_audio: fix race condition on endpoint stop Date: Wed, 1 Sep 2021 14:28:16 +0200 Message-Id: <20210901122254.280454719@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122253.388326997@linuxfoundation.org> References: <20210901122253.388326997@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 223029fa8445..4e01ba0ab8ec 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -349,8 +349,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; @@ -368,11 +366,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;