Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7192860rwr; Wed, 10 May 2023 05:19:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53gg5GM8aegBo+pu+Wu3ChwtyEStrUcpqKMWmNddUzKjj119cv0z5klwIZMJ9vEaFOAdWI X-Received: by 2002:a17:90b:3a8d:b0:23f:9fac:6b35 with SMTP id om13-20020a17090b3a8d00b0023f9fac6b35mr17195153pjb.39.1683721143739; Wed, 10 May 2023 05:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683721143; cv=none; d=google.com; s=arc-20160816; b=f3E1tQ1JSFO9l82X1mzn7DisaqSjgfbiBOV2K+tKluOSHpojw+IOhtQCfBX/VrJML1 4vHIxossE3WbFbmvo5OtocsX6HW0HZft+XDWpG93CROBSkH+sPfUGL1vQEikqqq4HbXL VJjfL4b/xxDRt0pBuVUO+2gUGnnOlwCiblFwaJKn9dNuEUBIatmAo/RuzGEXj1kz+xCj UFLrPlHYsyp/jeDURrDaPu9xtM/uLC4dFi2zcGLunraI2i7ERqR2yCRCzBv5Z+wWMXp3 Bh5KHQCafyoguUqURqTK6biDAdG+N4ysii14XjTB1NLGSTjxQbrtu3y8XizhvbQc8pRw Zx1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OPosaf8MCsgv6yWNmFA6HsxG7j+lWW9zDOaIVLm0zpY=; b=BGf09JXJpobcwLAc7I8ZDTAYsQlTPq0NoSy7GgCKe8kkn9TwVsweIHFqO8F+gzxWOk t+AYyPgVi3HEfzwPFBwT0SKDyiS5rwwi402cDetiP14ELKxUig7zrkJTmhwzhpX2SeD7 hU68oIpCZyaeF3gQkQVgxaBA4GhDBrDmniaTjFE6xEontCGwfgrLid2n7gr+eYi23w6+ /iOIn/DqDgm3N5pqQwAA6gZBa13Rgg1ldS8WEn8C7lGS6AzQ7nixi/bgnh4MxOoY1R/k sfdfZBQT1f8i+E86RUl6RNf6HuCa308/MyLNzhMfXKXl+/i3ZOnX8w/Ikbw+iqiVKoTE zNVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=ax7zBY6Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o25-20020a639219000000b005030eb175d1si3771288pgd.107.2023.05.10.05.18.49; Wed, 10 May 2023 05:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=ax7zBY6Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236924AbjEJMAO (ORCPT + 99 others); Wed, 10 May 2023 08:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236894AbjEJMAF (ORCPT ); Wed, 10 May 2023 08:00:05 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 218827DB6 for ; Wed, 10 May 2023 05:00:02 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-50dba8a52dcso12120a12.0 for ; Wed, 10 May 2023 05:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683720000; x=1686312000; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OPosaf8MCsgv6yWNmFA6HsxG7j+lWW9zDOaIVLm0zpY=; b=ax7zBY6QKkRaU/GzkWDmTLjsLMhktpT0tZFnAzY6NwU7sMLMh9GeoeQCIlxwrcpNUV kNCA0uFaCpSDM3UtnDxz7QGNeeGZy76yhRq1w5FKmpVO6Frwrt1WmNFSBxez9X098DtK ef08Xpup/2FB09NUpbxVKDr3cEooVEbhm5xz0oc4UB9sLFNnTgrapexbfbdmpsPFvecD 9GK0KN10z7vA1LSGsvOtFp2qLB9NgvXP21DOUN9twmWmadd2lixAEUbRBbM8AkF79zDM HJRI4rHvwAdDPUchkrsCiROTiwfXGsV28calQh1UBniWCdoM5Jgr29Psdv5sBI87YSQq cdXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683720000; x=1686312000; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OPosaf8MCsgv6yWNmFA6HsxG7j+lWW9zDOaIVLm0zpY=; b=gV3kahUNJNzgtGWpQESMw7Z2HfGAmmdsEavTjhtdnlvU96n9QvE73lHbjRy1Eth/in BkQR4ORRS5YAybqOupUk9d7j03tqoht6Zdl3BPBzUQGzIFXEVFhTtUXDm1vAk+tOaiCf n/914KS5uk5E6L4doqkZqbPcMuDnQv69WPzkxVqdAWh2EOcoFzEm2zIxVDLWK7Nl7lHa KoKhieQ2VR06ClhESXjc7WtxTJrqRmUJxSLh24t8X7ceaipjobSAKY1UfVdGXC69MYC7 pKjAdOK24X6ynB4IPEU13aNxtv37023NKpnzNl4Ct8HNMuRh7FFe5WE+90U7xJELNv0P PvPQ== X-Gm-Message-State: AC+VfDykDRgonjItFPXecAwcNDVV/Mjl7iaC9TmM6bmWy6CM6/zw8NYm AEHoTXHDX79JucJdt857ERijaMTdglhFRHf31TE9ag== X-Received: by 2002:a05:6402:2744:b0:506:90c4:b63b with SMTP id z4-20020a056402274400b0050690c4b63bmr103304edd.4.1683720000454; Wed, 10 May 2023 05:00:00 -0700 (PDT) MIME-Version: 1.0 References: <20230504092142.4190069-1-yixuanjiang@google.com> <2023050644-dwarf-shabby-d44d@gregkh> In-Reply-To: <2023050644-dwarf-shabby-d44d@gregkh> From: Yixuan Jiang Date: Wed, 10 May 2023 19:59:49 +0800 Message-ID: Subject: Re: [PATCH] ASoC: soc-pcm: Fix and cleanup DPCM locking To: Greg KH 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg KH =E6=96=BC 2023=E5=B9=B45=E6=9C=886=E6=97=A5 =E9=80= =B1=E5=85=AD =E4=B8=8B=E5=8D=881:56=E5=AF=AB=E9=81=93=EF=BC=9A > > 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.bos= sart@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.