mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 04:44:03 +00:00
ASoC: soc-pcm: use GFP_ATOMIC for dpcm structure
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 <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
+1
-1
@@ -1113,7 +1113,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