summaryrefslogtreecommitdiff
path: root/sound/soc/atmel/atmel_ssc_dai.h
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2019-09-18 12:03:44 +0200
committerMark Brown <broonie@kernel.org>2019-09-18 11:12:24 +0100
commit0dce49efc70536a8c3b4bb5354a71b727ba31b80 (patch)
tree5ad1e15f8f6188b90de37bb6f0ab025ad07b106b /sound/soc/atmel/atmel_ssc_dai.h
parenta0a4bf57a977ed37bcbdfc8027a44485fe086a3d (diff)
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>
Diffstat (limited to 'sound/soc/atmel/atmel_ssc_dai.h')
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.h b/sound/soc/atmel/atmel_ssc_dai.h
index ae764cb541c7..3470b966e449 100644
--- a/sound/soc/atmel/atmel_ssc_dai.h
+++ b/sound/soc/atmel/atmel_ssc_dai.h
@@ -93,7 +93,6 @@ struct atmel_ssc_state {
struct atmel_ssc_info {
char *name;
struct ssc_device *ssc;
- spinlock_t lock; /* lock for dir_mask */
unsigned short dir_mask; /* 0=unused, 1=playback, 2=capture */
unsigned short initialized; /* true if SSC has been initialized */
unsigned short daifmt;