All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
@ 2014-02-25 14:37 Jarkko Nikula
  2014-02-25 14:42 ` Liam Girdwood
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jarkko Nikula @ 2014-02-25 14:37 UTC (permalink / raw)
  To: alsa-devel
  Cc: Liam Girdwood, Jarkko Nikula, Mark Brown, Mika Westerberg, Liam Girdwood

I swear I tested missing firmware in commit e5161d7987f1 ("ASoC: Intel:
sst-acpi: Request firmware before SST platform driver probing").

Unfortunately same wasn't done in commit 6dda27cbbd1d ("ASoC: Intel:
sst-acpi: Add support for multiple machine drivers per platform") which
will cause NULL pointer dereference in sst_acpi_fw_cb() when printing the
error since sst_acpi->mach is not set.

Fix this obvious error by setting the sst_acpi->mach in sst_acpi_probe().

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 sound/soc/intel/sst-acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/sst-acpi.c b/sound/soc/intel/sst-acpi.c
index 0bb43169e146..5d06eecb6198 100644
--- a/sound/soc/intel/sst-acpi.c
+++ b/sound/soc/intel/sst-acpi.c
@@ -139,6 +139,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
 	sst_pdata = &sst_acpi->sst_pdata;
 	sst_pdata->id = desc->sst_id;
 	sst_acpi->desc = desc;
+	sst_acpi->mach = mach;
 
 	if (desc->resindex_dma_base >= 0) {
 		sst_pdata->dma_engine = desc->dma_engine;
-- 
1.8.5.3

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

* Re: [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
  2014-02-25 14:37 [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware Jarkko Nikula
@ 2014-02-25 14:42 ` Liam Girdwood
  2014-02-25 16:57 ` Adam Williamson
  2014-02-25 23:47 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2014-02-25 14:42 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown, Mika Westerberg, Liam Girdwood

On Tue, 2014-02-25 at 16:37 +0200, Jarkko Nikula wrote:
> I swear I tested missing firmware in commit e5161d7987f1 ("ASoC: Intel:
> sst-acpi: Request firmware before SST platform driver probing").
> 
> Unfortunately same wasn't done in commit 6dda27cbbd1d ("ASoC: Intel:
> sst-acpi: Add support for multiple machine drivers per platform") which
> will cause NULL pointer dereference in sst_acpi_fw_cb() when printing the
> error since sst_acpi->mach is not set.
> 
> Fix this obvious error by setting the sst_acpi->mach in sst_acpi_probe().
> 
> Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

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

* Re: [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
  2014-02-25 14:37 [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware Jarkko Nikula
  2014-02-25 14:42 ` Liam Girdwood
@ 2014-02-25 16:57 ` Adam Williamson
  2014-02-25 23:47 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Adam Williamson @ 2014-02-25 16:57 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: Liam Girdwood, alsa-devel, Mark Brown, Mika Westerberg, Liam Girdwood

On Tue, 2014-02-25 at 16:37 +0200, Jarkko Nikula wrote:
> I swear I tested missing firmware in commit e5161d7987f1 ("ASoC: Intel:
> sst-acpi: Request firmware before SST platform driver probing").
> 
> Unfortunately same wasn't done in commit 6dda27cbbd1d ("ASoC: Intel:
> sst-acpi: Add support for multiple machine drivers per platform") which
> will cause NULL pointer dereference in sst_acpi_fw_cb() when printing the
> error since sst_acpi->mach is not set.
> 
> Fix this obvious error by setting the sst_acpi->mach in sst_acpi_probe().

FWIW, I did test with the patch set from lrg's tree as of a couple days
ago, and hit this crash. So I can confirm the bug for sure. I'll test
the fix with a new kernel build in a couple of hours.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net

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

* Re: [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
  2014-02-25 14:37 [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware Jarkko Nikula
  2014-02-25 14:42 ` Liam Girdwood
  2014-02-25 16:57 ` Adam Williamson
@ 2014-02-25 23:47 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-02-25 23:47 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Mika Westerberg, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 222 bytes --]

On Tue, Feb 25, 2014 at 04:37:47PM +0200, Jarkko Nikula wrote:
> I swear I tested missing firmware in commit e5161d7987f1 ("ASoC: Intel:
> sst-acpi: Request firmware before SST platform driver probing").

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2014-02-25 23:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-25 14:37 [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware Jarkko Nikula
2014-02-25 14:42 ` Liam Girdwood
2014-02-25 16:57 ` Adam Williamson
2014-02-25 23:47 ` Mark Brown

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.