From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB0E6FBE7 for ; Mon, 15 May 2023 17:28:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51090C433D2; Mon, 15 May 2023 17:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684171703; bh=TBI4Upwy5WgmtsCdKAeGUyT3cZ/KvE+EUXYahU3rWSQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KG4fnWppXhsRlyuxZEoNdwpifpsruM3u+mm5pxRvHtsgxfWmCCaYjzbTfYDhZTEDM bTWRIdYXYxP/LsY89LZ7WEYUMoOB01ZHCrSxHOnMc/zOywnuIXkgsAQ2rAREQhYeYR S5zVBy8MtnB5yNVfs5kzplXyPuGC9EmYyBK8Njrc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guennadi Liakhovetski , Pierre-Louis Bossart , Kai Vehmanen , Bard Liao , Ranjani Sridharan , Mark Brown , Sasha Levin Subject: [PATCH 5.15 011/134] ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure Date: Mon, 15 May 2023 18:28:08 +0200 Message-Id: <20230515161703.334240982@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515161702.887638251@linuxfoundation.org> References: <20230515161702.887638251@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Pierre-Louis Bossart [ Upstream commit d8a9c6e1f6766a16cf02b4e99a629f3c5512c183 ] We allocate a structure in dpcm_be_connect(), which may be called in atomic context. Using GFP_KERNEL is not quite right, we have to use GFP_ATOMIC to prevent the allocator from sleeping. Suggested-by: Guennadi Liakhovetski 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-2-pierre-louis.bossart@linux.intel.com 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 6f616ac4490f0..a2b20526e7e2b 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1132,7 +1132,7 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, return 0; } - dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL); + dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_ATOMIC); if (!dpcm) return -ENOMEM; -- 2.39.2