From nobody Tue Jun 30 14:23:54 2026 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 02122C433F5 for ; Sun, 16 Jan 2022 11:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234863AbiAPLSa (ORCPT ); Sun, 16 Jan 2022 06:18:30 -0500 Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:64347 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbiAPLS2 (ORCPT ); Sun, 16 Jan 2022 06:18:28 -0500 Received: from pop-os.home ([90.126.236.122]) by smtp.orange.fr with ESMTPA id 93YEngVhBZQwW93YFnBe69; Sun, 16 Jan 2022 12:18:25 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 16 Jan 2022 12:18:25 +0100 X-ME-IP: 90.126.236.122 From: Christophe JAILLET To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Pierre-Louis Bossart Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , alsa-devel@alsa-project.org Subject: [PATCH] ASoC: soc-pcm: use GFP_ATOMIC in dpcm_create_debugfs_state() Date: Sun, 16 Jan 2022 12:18:17 +0100 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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. --- 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_dp= cm *dpcm, int stream) { char *name; =20 - name =3D kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, + name =3D kasprintf(GFP_ATOMIC, "%s:%s", dpcm->be->dai_link->name, stream ? "capture" : "playback"); if (name) { dpcm->debugfs_state =3D debugfs_create_dir( --=20 2.32.0