OpenCloudOS-Kernel/sound/soc/atmel
Gregory CLEMENT 0dce49efc7
ASoC: atmel_ssc_dai: Remove wrong spinlock usage
A potential bug was reported in the email "[BUG] atmel_ssc_dai: a
possible sleep-in-atomic bug in atmel_ssc_shutdown"[1]

Indeed in the function atmel_ssc_shutdown() free_irq() was called in a
critical section protected by spinlock.

However this spinlock is only used in atmel_ssc_shutdown() and
atmel_ssc_startup() functions. After further analysis, it occurred that
the call to these function are already protected by mutex used on the
calling functions.

Then we can remove the spinlock which will fix this bug as a side
effect. Thanks to this patch the following message disappears:

"BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:909"

[1]: https://www.spinics.net/lists/alsa-devel/msg71286.html

Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Link: https://lore.kernel.org/r/20190918100344.23629-1-gregory.clement@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-18 11:12:24 +01:00
..
Kconfig ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig 2019-08-27 20:40:01 +01:00
Makefile ASoC: mchp-i2s-mcc: add driver for I2SC Multi-Channel Controller 2019-03-21 14:53:12 +00:00
atmel-classd.c ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
atmel-classd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-i2s.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
atmel-pcm-dma.c ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() 2019-06-28 15:08:38 +01:00
atmel-pcm-pdc.c ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() 2019-06-28 15:08:38 +01:00
atmel-pcm.h ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() 2019-06-28 15:08:38 +01:00
atmel-pdmic.c ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
atmel-pdmic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel_ssc_dai.c ASoC: atmel_ssc_dai: Remove wrong spinlock usage 2019-09-18 11:12:24 +01:00
atmel_ssc_dai.h ASoC: atmel_ssc_dai: Remove wrong spinlock usage 2019-09-18 11:12:24 +01:00
atmel_wm8904.c ASoC: atmel: atmel_wm8904: consider CPU-Platform possibility unnecessary Platform" 2019-06-28 15:10:01 +01:00
mchp-i2s-mcc.c ASoC: mchp-i2s-mcc: Fix simultaneous capture and playback in master mode 2019-08-20 18:39:46 +01:00
mikroe-proto.c ASoC: amtel: mikroe-proto: consider CPU-Platform possibility 2019-06-28 15:10:11 +01:00
sam9g20_wm8731.c ASoC: atmel: sam9g20_wm8731: consider CPU-Platform possibility 2019-06-28 15:10:31 +01:00
sam9x5_wm8731.c ASoC: atmel: sam9x5_wm8731: consider CPU-Platform possibility 2019-06-28 15:10:41 +01:00
tse850-pcm5142.c ASoC: atmel: tse850-pcm5142: consider CPU-Platform possibility 2019-06-28 15:10:51 +01:00