Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3526861pxf; Mon, 15 Mar 2021 11:31:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTgJGiVTiJIXQF4zF7Edd+BZNi2iWSzv1ePCFV9aQSdB0+NEt5pz/0sDOTDEvHL8zF++gP X-Received: by 2002:a17:906:8593:: with SMTP id v19mr25274385ejx.32.1615833113654; Mon, 15 Mar 2021 11:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833113; cv=none; d=google.com; s=arc-20160816; b=d9uQZtomaIp8kQ62T0r44M4/B6CLydo3FMgI0RCVF4ZtdySjja+5FVUowyqmjeqnV6 lH/uE2W8JEgVYmAjhEc5+IGV4wWgsfiboN4YlfPEXDyMmPpksP6TX1yKsmBWC3fyVZfO PzrMhV0/ZuGEvmqPLR02Zy3Mswq6sNkfA0Qwvhdzhk1KnWV4WMgqDCUsGt+8cj+m3ibw 4qY+Exeos+tKaAHRC6hnoDvQkJJr7M6b2rf81zLAzdgbtXwjHSpo10I39CISSIiFh5ZW QjiWb8cw/0z6r1SVlyuzA+66W81dannyBDU5nBvA2/7sQwZNS7kDAqvJEDJK5B4vBYvQ 9HDQ== 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=n40lU4zAVJNaQoSGI7tHwtyNfyVSHN+vu4y6mHpt6rI=; b=mh3BJnMzKyZGQRT6je/LGoR7hLmJN+W7gglvASi1XAmtMyP2JOWi27lKBOEo6vC4Qw RUwndHh/qh/HftTfTcqWKM/Tmp+dZVF6cmbZDpSmjIJZoyxtpjeE9fkOw84IeQxW8Mba LYoPBdltWtffzPBl1URhWIOIklcqNGTCAfEyOKIV8SH1iGLKnFAFkJZ8CICdrkeRAoQj uX056D0wlAMTR3ahdnAxWJK97mvTr0aI55nHJthIFJx8RmfcDigFkQPWTS8NN1L2ShSc 2E569pfhkngYP997O1Zrq26h2djnv6Bk0kWTPiBk1U1oCarhQBQi17OvzV2QKOZ84VIo UgPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JKDaEXor; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si12404948edq.271.2021.03.15.11.31.30; Mon, 15 Mar 2021 11:31:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=JKDaEXor; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S240531AbhCOOiE (ORCPT + 99 others); Mon, 15 Mar 2021 10:38:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:48208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233497AbhCOOBw (ORCPT ); Mon, 15 Mar 2021 10:01:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2729B64F16; Mon, 15 Mar 2021 14:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816912; bh=198ZG1tjpE0eJK8e0iIWR6GPw4Ku9YEGd3F79jUu4mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JKDaEXorHU5gTrGUaRqf84Cpjr+YkT6w/ssoB1o5hBhgWkkJx6c1jawCGYWM8gwpd RBSxAVn/z+NplSmPtWpXJChHx36GOugaNMQNpVRu17Qlo8qLYI6jnsRG1uzcaqwGo7 KPGcgRIA0RZ42KPMwUEdN0CUggxjZUIBulwdIQK4= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ruslan Bilovol Subject: [PATCH 5.11 197/306] usb: gadget: f_uac1: stop playback on function disable Date: Mon, 15 Mar 2021 14:54:20 +0100 Message-Id: <20210315135514.284526721@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Ruslan Bilovol commit cc2ac63d4cf72104e0e7f58bb846121f0f51bb19 upstream. There is missing playback stop/cleanup in case of gadget's ->disable callback that happens on events like USB host resetting or gadget disconnection Fixes: 0591bc236015 ("usb: gadget: add f_uac1 variant based on a new u_audio api") Cc: # 4.13+ Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/1614599375-8803-3-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_uac1.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/function/f_uac1.c +++ b/drivers/usb/gadget/function/f_uac1.c @@ -499,6 +499,7 @@ static void f_audio_disable(struct usb_f uac1->as_out_alt = 0; uac1->as_in_alt = 0; + u_audio_stop_playback(&uac1->g_audio); u_audio_stop_capture(&uac1->g_audio); }