* [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices
@ 2011-11-23 19:24 Daniel Mack
2011-11-23 21:26 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2011-11-23 19:24 UTC (permalink / raw)
To: alsa-devel
Cc: Stephen Warren, Mark Brown, Liam Girdwood, "[v3.1]",
Daniel Mack, stable
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.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: stable@kernel.org [v3.1]
---
sound/soc/soc-core.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a5d3685..721f16e 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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
--
1.7.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices
2011-11-23 19:24 [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices Daniel Mack
@ 2011-11-23 21:26 ` Mark Brown
2011-11-23 21:37 ` Daniel Mack
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-11-23 21:26 UTC (permalink / raw)
To: Daniel Mack; +Cc: alsa-devel, Stephen Warren, Liam Girdwood, stable
On Wed, Nov 23, 2011 at 08:24:10PM +0100, Daniel Mack wrote:
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices
2011-11-23 21:26 ` Mark Brown
@ 2011-11-23 21:37 ` Daniel Mack
2011-11-23 21:51 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2011-11-23 21:37 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Stephen Warren, Liam Girdwood, stable
On 11/23/2011 10:26 PM, Mark Brown wrote:
> On Wed, Nov 23, 2011 at 08:24:10PM +0100, Daniel Mack wrote:
>> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices
2011-11-23 21:37 ` Daniel Mack
@ 2011-11-23 21:51 ` Mark Brown
2011-11-23 22:39 ` Daniel Mack
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-11-23 21:51 UTC (permalink / raw)
To: Daniel Mack; +Cc: alsa-devel, Stephen Warren, Liam Girdwood, stable
On Wed, Nov 23, 2011 at 10:37:43PM +0100, Daniel Mack wrote:
> On 11/23/2011 10:26 PM, Mark Brown wrote:
> > On Wed, Nov 23, 2011 at 08:24:10PM +0100, Daniel Mack wrote:
> >> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices
2011-11-23 21:51 ` Mark Brown
@ 2011-11-23 22:39 ` Daniel Mack
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Mack @ 2011-11-23 22:39 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Stephen Warren, Liam Girdwood, stable
On 11/23/2011 10:51 PM, Mark Brown wrote:
> On Wed, Nov 23, 2011 at 10:37:43PM +0100, Daniel Mack wrote:
>> On 11/23/2011 10:26 PM, Mark Brown wrote:
>>> On Wed, Nov 23, 2011 at 08:24:10PM +0100, Daniel Mack wrote:
>>>> 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.
I see, yes. But note that 3.1 also has this problem, so we need the
patch to get backported.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-23 22:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 19:24 [PATCH] ASoC: core: don't try to resume uninstantiated a soc-audio devices Daniel Mack
2011-11-23 21:26 ` Mark Brown
2011-11-23 21:37 ` Daniel Mack
2011-11-23 21:51 ` Mark Brown
2011-11-23 22:39 ` Daniel Mack
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.