UPSTREAM: ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure
[ 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 <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Fixes: aa9ff6a4955f ("ASoC: soc-compress: Reposition and add pcm_mutex") Signed-off-by: Yixuan Jiang <yixuanjiang@google.com> Cc: stable@vger.kernel.org # 5.15+ Bug: 287928097 Bug: 277241308 Link: https://lore.kernel.org/all/20230511120841.2096524-2-yixuanjiang@google.com Change-Id: Id20dc271a73e1fc40d95bc39c367f9476b72c6f9 Signed-off-by: Yixuan Jiang <yixuanjiang@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
81eae26664
commit
9a54f9ba70
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user