Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1828296rwr; Fri, 5 May 2023 23:03:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UCwuXiI+KyovMWGdP1vDoi9zn/4YtSUeMXbIOLcuNLFYHIJwpZsIWxG7zp4hI5sprtKIK X-Received: by 2002:a05:6a00:198c:b0:63b:8b47:453c with SMTP id d12-20020a056a00198c00b0063b8b47453cmr5805934pfl.1.1683353012597; Fri, 05 May 2023 23:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683353012; cv=none; d=google.com; s=arc-20160816; b=g+psEPICom328s/y6yLFE7+tQ1X1GU45K+xUYwq33RsdbIGvAjmuxtOOQv39O9bxdL e3eWfi6PNu0MI/Z/VYMXR0WAcSmNSpcggw0u+mx4K0gpL4NFGHIiCO8BZMljImhZh8tM TsZK1Gf+zhM/NLz/phBMqjlptgn9kw/xlpu8vC3CecOhy7GroVmDVdnOgcT09e32b9jf HUDkgAfzbYC35sWrAGDOhyvNjpl2WSIjLCrD97ayvtvyOUD6Z3o/Ub4wO2ByJNuEWI+s 7YWQhVaS9PAuE+anaZjnVFrtwaYYoWOTDoZi7migp2melJ575QFQjZuHOP3mKbICaO50 6VHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=EGS5hZyAL9I43PGeKYKJIudiB349boLUw0HVlFIo3AQ=; b=xLvPYOmCToMIEHaqHU6/VUFpk1tJMDrewDTKN5X/+6VTlhXE7fntqMiAe9OwFvlxDZ NVf4bQMvhGoP2gaD6hZ0vBUbQ36rqkhGdjNUg4k8Pn5XBiR5Q0ClG+b5U4x8F1YCgZ4s mIb/34MXG16mRp5NnbI2tHdlOIsB2t3GMvWaTtJ4/opDAGi1/+LAnJ+ovC3BTQVgWAI1 tWy6tMJ8a1mV241IkBFmXGyNcKNseJDGZ27dPcITPSm1VKh2tjz5+3yobSazPaZsDHzg 8ieHhchGBt8YfEin+611NJ+JxexRRwFhqxemP/uE86NC6sEQiYY1WZOt2KdW/IrwvpBn PeCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b=tVyeQUA+; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=fCk8zsDa; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x62-20020a626341000000b0063d5f645cacsi3641353pfb.116.2023.05.05.23.03.20; Fri, 05 May 2023 23:03:32 -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=@kroah.com header.s=fm3 header.b=tVyeQUA+; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=fCk8zsDa; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbjEFF4N (ORCPT + 99 others); Sat, 6 May 2023 01:56:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230221AbjEFF4M (ORCPT ); Sat, 6 May 2023 01:56:12 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AF37ECA; Fri, 5 May 2023 22:56:11 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 74B7B5C0088; Sat, 6 May 2023 01:56:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 06 May 2023 01:56:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1683352570; x=1683438970; bh=EG S5hZyAL9I43PGeKYKJIudiB349boLUw0HVlFIo3AQ=; b=tVyeQUA+MP9z3eOiSJ CbCDeX/CmDAJLaBykdXzTvPnjxnVzH3lYWd0uTPKAs0HVu6gIVlgjRrpty5ypJWb lzV2PCwX5egBJM/2X4qSNnF8l3oM/tzbisuZ/h+OqjI/FUEQtpvfRUH/3FJ/GhgO rbcq3y5VDdKWBjtyWEWRYBRZnQrEXS+z/2BOfp+CusjSwSoTtKfoZnWO4Mio/Shw p5R38mgA0AgfPvFLVxdRc45n2zfV4Xwphc2yVhX7jAtjdIIXRf10vWxsX1gl0VcH oImHFNOjEfOLvQuIKZwT+UEycWU6TWQL9mnZPsBr8K/msgBfofCbJezUSXTygL3k j0DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1683352570; x=1683438970; bh=EGS5hZyAL9I43 PGeKYKJIudiB349boLUw0HVlFIo3AQ=; b=fCk8zsDaqA/oZLRtVBG1pcijz8cOw LfZRwDUUBra1euNIhrb9FtiH9eF3c7+GqVB/6cYH650FWmnbNdWrkVnkVOO9UxQy /Pb/qs8XSIOYr2wnhkEd0d5NuvBqflUdkGE4n/2J1ohjI/LVTAulHfWuVkxWVrqR M/wY6x6CoMS1sXEHfCnfJW6MvN2SPIFaNocXjVMngCi3MlgG9/VXtBL7701TSJnK HazjBVDqF+UQ2GQrHo/bDhniCdP865TZSa8F4tQ5ib99COw8TpL0J76yIyE4CDIY LsD9irx4/0C5NYDoFNJpOmYEvLdRUi0P5VfQXeGIg0pMQRjLqPHQ5DDkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeffedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgv ghcumffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeeghe euhefgtdeluddtleekfeegjeetgeeikeehfeduieffvddufeefleevtddtvdenucffohhm rghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 May 2023 01:56:08 -0400 (EDT) Date: Sat, 6 May 2023 11:09:57 +0900 From: Greg KH To: yixuanjiang 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: <2023050644-dwarf-shabby-d44d@gregkh> References: <20230504092142.4190069-1-yixuanjiang@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230504092142.4190069-1-yixuanjiang@google.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 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