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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15ADDC433EF for ; Mon, 17 Jan 2022 08:50:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B1ED01790; Mon, 17 Jan 2022 09:49:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B1ED01790 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1642409442; bh=pg77KKDLhcHrqbHIFPT+A9/Ba2ObGFxR+SxALb1akZ4=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FbmiUnmmybaDqeMqN2mVIztYXIMsrxX3/Q4vZSwMSbJHib5q6WxGYOiJkg8fgUUy+ b+x2h1QzcFzpvaCJrag80CIUlMosQiqphJaCzy9QmXSYA46paP++9ozC9cFq5OSjeA GxY8o+pXowJ5FvYkDafJE/VDZEckyCBtY70gyIds= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5373EF800EB; Mon, 17 Jan 2022 09:49:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 195C1F80249; Mon, 17 Jan 2022 09:49:51 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 50104F80100 for ; Mon, 17 Jan 2022 09:49:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 50104F80100 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ouMAaen2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="odQbqVyM" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3E0C4212C5; Mon, 17 Jan 2022 08:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1642409386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x7NbE1cz3mCHoBV0xZwgaqW3n2cPIO8g7sgh5GC3ssM=; b=ouMAaen2BzJFYNRkdGsg20x77SJqWQO0U0vl6xOc4mIdOQ81bNIPfqR3aCabNaRetD2NqD SHVXvOI54Zphd/Su4DkKvxHw6eqNTBogmV8LORMfBo3OO5CMOmvRQ9R72w63e+2FxVBxWr 8Rb+pyNfcL4v9iPudqbVCwMg9PmRRRU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1642409386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x7NbE1cz3mCHoBV0xZwgaqW3n2cPIO8g7sgh5GC3ssM=; b=odQbqVyMj8V20P/7VblLBVpT/8tyJ0/34fY6CrQVFpgZoh5UDh+ewIUv/2HUHSVljyr0ne TUqHV75XGuBVG1CA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 278BEA3B81; Mon, 17 Jan 2022 08:49:46 +0000 (UTC) Date: Mon, 17 Jan 2022 09:49:46 +0100 Message-ID: From: Takashi Iwai To: Christophe JAILLET Subject: Re: [PATCH] ASoC: soc-pcm: use GFP_ATOMIC in dpcm_create_debugfs_state() In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Pierre-Louis Bossart , alsa-devel@alsa-project.org, Kai Vehmanen , Liam Girdwood , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Ranjani Sridharan , Takashi Iwai , Mark Brown , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Sun, 16 Jan 2022 12:18:17 +0100, Christophe JAILLET wrote: > > The commit below states that dpcm_be_connect() may be called from atomic > context. It changes a GFP_KERNEL into a GFP_ATOMIC to deal with it. > > Another memory allocation is done in dpcm_create_debugfs_state() which is > called by dpcm_be_connect(). Also use GFP_ATOMIC there to be consistent > and be compliant with atomic context. > > Fixes: d8a9c6e1f676 ("ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure") > Signed-off-by: Christophe JAILLET > --- > Not clear to me how dpcm_be_connect() can be called from an atomic context, > though. But better safe than sorry. I don't think this no longer valid for the very latest code. The commit b7898396f4bb dropped the spurious dpcm_lock spinlock, so the code path you touched must be always sleepable. Similarly, the commit d8a9c6e1f676 can be reverted now. thanks, Takashi > --- > 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 7abfc48b26ca..1a536a2b9dc3 100644 > --- a/sound/soc/soc-pcm.c > +++ b/sound/soc/soc-pcm.c > @@ -212,7 +212,7 @@ static void dpcm_create_debugfs_state(struct snd_soc_dpcm *dpcm, int stream) > { > char *name; > > - name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, > + name = kasprintf(GFP_ATOMIC, "%s:%s", dpcm->be->dai_link->name, > stream ? "capture" : "playback"); > if (name) { > dpcm->debugfs_state = debugfs_create_dir( > -- > 2.32.0 >