stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.17 01/22] ASoC: soc-pcm: use GFP_KERNEL when the code is sleepable
@ 2022-04-26 19:01 Sasha Levin
  2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 02/22] ASoC: cs35l41: Fix a shift-out-of-bounds warning found by UBSAN Sasha Levin
                   ` (21 more replies)
  0 siblings, 22 replies; 26+ messages in thread
From: Sasha Levin @ 2022-04-26 19:01 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Christophe JAILLET, Mark Brown, Sasha Levin, lgirdwood, perex,
	tiwai, alsa-devel

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

[ Upstream commit fb6d679fee95d272c0a94912c4e534146823ee89 ]

At the kzalloc() call in dpcm_be_connect(), there is no spin lock involved.
It's merely protected by card->pcm_mutex, instead.  The spinlock is applied
at the later call with snd_soc_pcm_stream_lock_irq() only for the list
manipulations.  (See it's *_irq(), not *_irqsave(); that means the context
being sleepable at that point.)  So, we can use GFP_KERNEL safely there.

This patch revert commit d8a9c6e1f676 ("ASoC: soc-pcm: use GFP_ATOMIC for
dpcm structure") which is no longer needed since commit b7898396f4bb
("ASoC: soc-pcm: Fix and cleanup DPCM locking").

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e740f1930843060e025e3c0f17ec1393cfdafb26.1648757961.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 9a954680d492..11c9853e9e80 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1214,7 +1214,7 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe,
 		be_substream->pcm->nonatomic = 1;
 	}
 
-	dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_ATOMIC);
+	dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL);
 	if (!dpcm)
 		return -ENOMEM;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-05-02 14:01 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 19:01 [PATCH AUTOSEL 5.17 01/22] ASoC: soc-pcm: use GFP_KERNEL when the code is sleepable Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 02/22] ASoC: cs35l41: Fix a shift-out-of-bounds warning found by UBSAN Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 03/22] ASoC: rt711/5682: check if bus is active before deferred jack detection Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 04/22] ASoC: Intel: soc-acpi: correct device endpoints for max98373 Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 05/22] ASoC: wm8731: Disable the regulator when probing fails Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 06/22] ASoC: Intel: sof_es8336: Add a quirk for Huawei Matebook D15 Sasha Levin
2022-04-27 11:28   ` Mark Brown
2022-05-01 19:32     ` Sasha Levin
2022-05-02 14:01       ` Pierre-Louis Bossart
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 07/22] Input: cypress-sf - register a callback to disable the regulators Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 08/22] ext4: fix bug_on in start_this_handle during umount filesystem Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 09/22] arch: xtensa: platforms: Fix deadlock in rs_close() Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 10/22] ksmbd: increment reference count of parent fp Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 11/22] ksmbd: set fixed sector size to FS_SECTOR_SIZE_INFORMATION Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 12/22] ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit() Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 13/22] erofs: fix use-after-free of on-stack io[] Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 14/22] bonding: do not discard lowest hash bit for non layer3+4 hashing Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 15/22] x86: __memcpy_flushcache: fix wrong alignment if size > 2^32 Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 16/22] cifs: destage any unwritten data to the server before calling copychunk_write Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 17/22] drivers: net: hippi: Fix deadlock in rr_close() Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 18/22] powerpc/perf: Fix 32bit compile Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 19/22] ALSA: hda: intel-dsp-config: Add RaptorLake PCI IDs Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 20/22] ata: pata_marvell: Check the 'bmdma_addr' beforing reading Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 21/22] selftest/vm: verify mmap addr in mremap_test Sasha Levin
2022-04-26 19:01 ` [PATCH AUTOSEL 5.17 22/22] selftest/vm: verify remap destination address " Sasha Levin
2022-04-26 19:32 ` [PATCH AUTOSEL 5.17 01/22] ASoC: soc-pcm: use GFP_KERNEL when the code is sleepable Marion & Christophe JAILLET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).