Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4418103ioa; Wed, 27 Apr 2022 03:30:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVPavlClNDYlULBaYxWByfY437A5U0j0YYi4Ra/7M9Yq2z/XvcSBDVy9I/sHUdv/eEWpEW X-Received: by 2002:a63:2b91:0:b0:3ab:3da7:b5ac with SMTP id r139-20020a632b91000000b003ab3da7b5acmr12931436pgr.36.1651055448046; Wed, 27 Apr 2022 03:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055448; cv=none; d=google.com; s=arc-20160816; b=IrTYcB5+/NlOZCr6ThZv/Vac8Pfk81kpIQMSfjs+oRXQkLher1JfWh9WkSTcaO38gg ar7YkGvIkEq/TAxf2xx7nSmEymiSax+nWjGa99pTRFItPEfOuuQKsU2zy8LxD1E5qDuD XpU9/VnMxtFAxy8bVppWESfF1QtfNmG/GBPwrYnprNXLPxyd6Ntm6QLHghK6UX7fySmO oLtZymB5CeSQ5IQXik3GEChbfbKRKBjbjUhkOQntPf91mbb6L4IXT4Xux7fBLPmU7azI GtAYMLVrJao8fJWJvvz+OlhhR6/wpVCBBv0aLGeSzk4p873rlSNiPoLCPIYSF7EnB8K2 gXGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=MvDDRR0K4ev0o1ebiqTKQJ9Y72NfWNSyKiHn4paQ+7U=; b=XG5fWXo+3x3Ms7zTI187XCR5SXP4odn4xtm4VdP1BX37wNOPe59roeDMjtpqQO823+ fbz0E9sB7/GQUTPwEgiQxsozlnR2jfZjw5nxrv1Wl0nMFRxCemzv3FSzt8UjO9yC48Ty NUXIjzmc6HGv6btunioZZYZKBy89fpTtZC89NfNyufM1zdgiz4ZbmFpK3yQLqLXx6foq L45gqhYzNAwXJBrsQG6+KjgEeqGlog15OSy0nFcTYf7pyx+7sA7aBhZtya4b+ND7ZN5U ipDKO1H6qj7or9k/ctKYrwBDGuXAwjEbcjhC0nJlAyro5jY/CEeirUwIOk75aBup0SrE KFMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l70-20020a638849000000b003ab1f09b880si1041363pgd.694.2022.04.27.03.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:30:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F6C02886C0; Wed, 27 Apr 2022 02:45:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354169AbiDZTgH (ORCPT + 99 others); Tue, 26 Apr 2022 15:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346703AbiDZTgF (ORCPT ); Tue, 26 Apr 2022 15:36:05 -0400 Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4158184F2E for ; Tue, 26 Apr 2022 12:32:56 -0700 (PDT) Received: from [192.168.1.18] ([86.243.180.246]) by smtp.orange.fr with ESMTPA id jQvenj84zrYGrjQvenImsG; Tue, 26 Apr 2022 21:32:55 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Tue, 26 Apr 2022 21:32:55 +0200 X-ME-IP: 86.243.180.246 Message-ID: <6e3e881b-787d-30d5-054a-2ef43e3731b1@wanadoo.fr> Date: Tue, 26 Apr 2022 21:32:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH AUTOSEL 5.17 01/22] ASoC: soc-pcm: use GFP_KERNEL when the code is sleepable Content-Language: en-US To: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mark Brown , lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org References: <20220426190145.2351135-1-sashal@kernel.org> From: Marion & Christophe JAILLET In-Reply-To: <20220426190145.2351135-1-sashal@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Hi, I don't think that this patch needs backporting. It does not fix anything and could introduce some regression if b7898396f4bb is not also already backported. It could avoid some (unlikely?) allocation failure, but as this case is already handled ("if (!dpcm)"), it shouldn't be an issue if it happened. Just for my understanding, why has it auto-selected for backport? I thought that a Fixes tag and/or a real reported issue was need for this to happen. CJ Le 26/04/2022 à 21:01, Sasha Levin a écrit : > From: Christophe JAILLET > > [ Upstream commit fb6d679fee95d272c0a94912c4e534146823ee89 ] > > At the kzalloc() call in dpcm_be_connect(), there is no spin lock involved. > It's merely protected by card->pcm_mutex, instead. The spinlock is applied > at the later call with snd_soc_pcm_stream_lock_irq() only for the list > manipulations. (See it's *_irq(), not *_irqsave(); that means the context > being sleepable at that point.) So, we can use GFP_KERNEL safely there. > > This patch revert commit d8a9c6e1f676 ("ASoC: soc-pcm: use GFP_ATOMIC for > dpcm structure") which is no longer needed since commit b7898396f4bb > ("ASoC: soc-pcm: Fix and cleanup DPCM locking"). > > Signed-off-by: Christophe JAILLET > Link: https://lore.kernel.org/r/e740f1930843060e025e3c0f17ec1393cfdafb26.1648757961.git.christophe.jaillet@wanadoo.fr > Signed-off-by: Mark Brown > Signed-off-by: Sasha Levin > --- > sound/soc/soc-pcm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c > index 9a954680d492..11c9853e9e80 100644 > --- a/sound/soc/soc-pcm.c > +++ b/sound/soc/soc-pcm.c > @@ -1214,7 +1214,7 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, > be_substream->pcm->nonatomic = 1; > } > > - dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_ATOMIC); > + dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL); > if (!dpcm) > return -ENOMEM; >