Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2459898pxb; Sun, 16 Jan 2022 21:37:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBSMeYjiYsf0ExPAKdabTb4ZOG8BE0rw5vbEbl9R292HZUckRqfA3cMj1QBB2cnKB5xIol X-Received: by 2002:a17:903:41cf:b0:14a:5f35:52d4 with SMTP id u15-20020a17090341cf00b0014a5f3552d4mr21298034ple.14.1642397848956; Sun, 16 Jan 2022 21:37:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642397848; cv=none; d=google.com; s=arc-20160816; b=P4vFg9d4RfFZhSmBTAcEgmreVNU6rKlRf+e2txqRnBGkUnYkvwior0/pIeK06Z5AR9 jAhiwtcy3vLfUjfMxUaivJh20tatSwrqjwZjWqQGAZuKm5jY+eS6DNgpbUb6E5Lw0eDL dTw+bsE40BqjHbj08V8ml2+nDQX4q8ZiApH9O0JTbxCJ/0kyc4G6Jkc4Oxcwu2Q6/wWj 3AHTRcvkDTVIT2w2D5oQySR78ydMcGVHNWZX3kis8tSYEAL8OC0ioVRujfbmqJJ5RsE9 UuDsUD7tvIoIYtn12HDDaOiv+cBGrXld9hkbIQ180Pmc4FHnQCkAzCWhfBQ+MyiOLrSz ilmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=c05Q5Sk1pTJhJ6nVRcEIQkPnK9+AdWJIs7fvQDREo/c=; b=0wd0/hkpbhl21e30JwoXsIL+FauU47InRl4VB0r3KHgn9g4EYTUH6Te8jB/q0BWvLp w1Ln9kTmngnBAymeOmyrhZvPIwLbEAgKELPu2u0qR88dVw3m17+O+Qgj0JApzw1G9XSp 2f5vK35dJcugh8ZPWaqrF458RMc2oHgCjkUDks7cQb1qGnzhdtkleZxMkAnzS0l2nWdP cH2RYzRGvecQbM1sUcS7J9ycSu1ckEdj3nbXew6O1Kx4ZbYKG+bzQocdJW0EnpT5KuDP xPNqEPXbOwx18plArVdcN/qMeUa0hS1TVGfhbG5aM/qgNLzBaIv/cMT3aj2cZ3K7YMJx FMow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d127si13026225pgc.97.2022.01.16.21.37.17; Sun, 16 Jan 2022 21:37:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234860AbiAPLS3 (ORCPT + 99 others); Sun, 16 Jan 2022 06:18:29 -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: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_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