ASoC: core: don't try to resume uninstantiated a soc-audio devices
PATCH 1/1 ASoC: core: don't try to resume uninstantiated a soc-audio devices
The code tries to schedule a work item from the resume context, which will crash the kernel if snd_soc_instantiate_card() has not been called for the card before.
The bug I triggered is related to 82e14e8b ("ASoC: core: Don't schedule deferred_resume_work twice"), hence a backport to 3.1 is necessary.
--- sound/soc/soc-core.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/soc-core.c +3 -0
@@ -709,6 +709,9 @@ int snd_soc_resume(struct device *dev)struct snd_soc_card *card =dev_get_drvdata (dev);int i, ac97_control =0 ; +if (!card->instantiated) +return 0 ; +/* AC97 devices might have other drivers hanging off them so * need to resume immediately. Other drivers don't have that * problem and may take a substantial amount of time to resume
Signature · 1 line
1.7.7.3
Quoted 3 lines · Daniel Mack
The code tries to schedule a work item from the resume context, which will crash the kernel if
snd_soc_instantiate_card()has not been called for the card before.
Eric already sent a slightly different fix for this which is applied.
Quoted 6 lines · Mark Brown
Quoted 3 lines · Daniel Mack
The code tries to schedule a work item from the resume context, which will crash the kernel if
snd_soc_instantiate_card()has not been called for the card before.Eric already sent a slightly different fix for this which is applied.
Could you give me a pointer to this patch? I had this problem today with Linus' latest git tip.
Quoted 10 lines · Daniel Mack
Quoted 6 lines · Mark Brown
Quoted 3 lines · Daniel Mack
The code tries to schedule a work item from the resume context, which will crash the kernel if
snd_soc_instantiate_card()has not been called for the card before.Eric already sent a slightly different fix for this which is applied.
Could you give me a pointer to this patch? I had this problem today with Linus' latest git tip.
It's the tip of my for-3.2. Slightly different fix but the effect should be the same.
Quoted 7 lines · Mark Brown
Quoted 5 lines · Daniel Mack
Quoted 4 lines · Mark Brown
Quoted 3 lines · Daniel Mack
The code tries to schedule a work item from the resume context, which will crash the kernel if
snd_soc_instantiate_card()has not been called for the card before.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Eric already sent a slightly different fix for this which is applied.
Could you give me a pointer to this patch? I had this problem today with Linus' latest git tip.
It's the tip of my for-3.2. Slightly different fix but the effect should be the same.
I see, yes. But note that 3.1 also has this problem, so we need the patch to get backported.