From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15968C7EE2A for ; Wed, 10 May 2023 14:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237438AbjEJOkH (ORCPT ); Wed, 10 May 2023 10:40:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237117AbjEJOkG (ORCPT ); Wed, 10 May 2023 10:40:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD1359E5; Wed, 10 May 2023 07:40:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D188D64997; Wed, 10 May 2023 14:40:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C90D3C43443; Wed, 10 May 2023 14:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683729604; bh=TjKlhOtDBWY6sVSqTa1AaoJ81i3ojA2DvjPkKpAO41c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ERlwxIN00t6/qzz559l67HTA8LJkeDZi3xxEfyPEXUWbRGMqZgmznIPUkuBuntLPV e1p0sE2gUk0AsrvC3MWLaSqRrcNHw/QU4woMV+onoaIIlC1fHets7J0j4baEa8AFmD wDf6sV+YW/pTWpZQIPl3609uG38qONAq+gE7QKOQ= Date: Wed, 10 May 2023 23:39:57 +0900 From: Greg KH To: Yixuan Jiang Cc: tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Takashi Iwai , Pierre-Louis Bossart , Kai Vehmanen , Bard Liao , Ranjani Sridharan , stable@vger.kernel.org Subject: Re: [PATCH] ASoC: soc-pcm: Fix and cleanup DPCM locking Message-ID: <2023051045-ransack-lullaby-a127@gregkh> References: <20230504092142.4190069-1-yixuanjiang@google.com> <2023050644-dwarf-shabby-d44d@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, May 10, 2023 at 07:59:49PM +0800, Yixuan Jiang wrote: > Greg KH 於 2023年5月6日 週六 下午1:56寫道: > > > > On Thu, May 04, 2023 at 05:21:42PM +0800, yixuanjiang wrote: > > > From: Takashi Iwai > > > > > > The existing locking for DPCM has several issues > > > a) a confusing mix of card->mutex and card->pcm_mutex. > > > b) a dpcm_lock spinlock added inconsistently and on paths that could > > > be recursively taken. The use of irqsave/irqrestore was also overkill. > > > > > > The suggested model is: > > > > > > 1) The pcm_mutex is the top-most protection of BE links in the FE. The > > > pcm_mutex is applied always on either the top PCM callbacks or the > > > external call from DAPM, not taken in the internal functions. > > > > > > 2) the FE stream lock is taken in higher levels before invoking > > > dpcm_be_dai_trigger() > > > > > > 3) when adding and deleting a BE, both the pcm_mutex and FE stream > > > lock are taken. > > > > > > Signed-off-by: Takashi Iwai > > > [clarification of commit message by plbossart] > > > Signed-off-by: Pierre-Louis Bossart > > > Reviewed-by: Kai Vehmanen > > > Reviewed-by: Bard Liao > > > Reviewed-by: Ranjani Sridharan > > > Link: https://lore.kernel.org/r/20211207173745.15850-4-pierre-louis.bossart@linux.intel.com > > > Cc: stable@vger.kernel.org # 5.15.x > > > Signed-off-by: Mark Brown > > > --- > > > > What is the git commit id of this patch in Linus's tree? > > > > thanks, > > > > greg k-h > > Hi Greg, > For this patch I think it is [3/6] b7898396f4bbe160f546d0c5e9fa17cca9a7d153 > > >From https://lore.kernel.org/all/163953384515.1515253.13641477106348913835.b4-ty@kernel.org/ > Seems there are total 6 patches. > > [1/6] ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure > commit: d8a9c6e1f6766a16cf02b4e99a629f3c5512c183 > [2/6] ASoC: soc-pcm: align BE 'atomicity' with that of the FE > commit: bbf7d3b1c4f40eb02dd1dffb500ba00b0bff0303 > [3/6] ASoC: soc-pcm: Fix and cleanup DPCM locking > commit: b7898396f4bbe160f546d0c5e9fa17cca9a7d153 > [4/6] ASoC: soc-pcm: serialize BE triggers > commit: b2ae80663008a7662febe7d13f14ea1b2eb0cd51 > [5/6] ASoC: soc-pcm: test refcount before triggering > commit: 848aedfdc6ba25ad5652797db9266007773e44dd > [6/6] ASoC: soc-pcm: fix BE handling of PAUSE_RELEASE > commit: 3aa1e96a2b95e2ece198f8dd01e96818971b84df > > These 6 patches could directly cherry-pick to in 5.15 without conflict. Then please submit them for stable inclusion after you have tested that they all work properly. But first, what bug is actually needed to be fixed here? What is not working that this patch series fixes? thanks, greg k-h