* [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe
@ 2014-02-15 19:28 Alexander Shiyan
2014-02-16 0:36 ` Mark Brown
2014-02-16 0:38 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Alexander Shiyan @ 2014-02-15 19:28 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai, Mark Brown, Liam Girdwood, Alexander Shiyan
This patch fixes a crash caused by commit af5b2d7519
(ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
This is an attempt to assign "drvdata->base" while memory
for "drvdata" is not already allocated.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
sound/soc/txx9/txx9aclc-ac97.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index e0305a1..9edd68d 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -183,14 +183,16 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
+
+ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
+
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
drvdata->base = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(drvdata->base))
return PTR_ERR(drvdata->base);
- drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
- if (!drvdata)
- return -ENOMEM;
platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start;
if (sizeof(drvdata->physbase) > sizeof(r->start) &&
--
1.8.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe
2014-02-15 19:28 [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe Alexander Shiyan
@ 2014-02-16 0:36 ` Mark Brown
2014-02-16 0:38 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-02-16 0:36 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Takashi Iwai, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 302 bytes --]
On Sat, Feb 15, 2014 at 11:28:29PM +0400, Alexander Shiyan wrote:
> This patch fixes a crash caused by commit af5b2d7519
> (ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
> This is an attempt to assign "drvdata->base" while memory
> for "drvdata" is not already allocated.
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] 5+ messages in thread
* Re: [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe
2014-02-15 19:28 [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe Alexander Shiyan
2014-02-16 0:36 ` Mark Brown
@ 2014-02-16 0:38 ` Mark Brown
2014-02-16 2:55 ` Alexander Shiyan
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-02-16 0:38 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Takashi Iwai, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 378 bytes --]
On Sat, Feb 15, 2014 at 11:28:29PM +0400, Alexander Shiyan wrote:
> This patch fixes a crash caused by commit af5b2d7519
> (ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
> This is an attempt to assign "drvdata->base" while memory
> for "drvdata" is not already allocated.
I don't know where you got that hash from by the way, that commit isn't
present in mainline?
[-- 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] 5+ messages in thread
* Re: [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe
2014-02-16 0:38 ` Mark Brown
@ 2014-02-16 2:55 ` Alexander Shiyan
2014-02-18 1:18 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Shiyan @ 2014-02-16 2:55 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, alsa-devel, Liam Girdwood
Воскресенье, 16 февраля 2014, 8:38 +08:00 от Mark Brown <broonie@kernel.org>:
> On Sat, Feb 15, 2014 at 11:28:29PM +0400, Alexander Shiyan wrote:
> > This patch fixes a crash caused by commit af5b2d7519
> > (ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
> > This is an attempt to assign "drvdata->base" while memory
> > for "drvdata" is not already allocated.
>
> I don't know where you got that hash from by the way, that commit isn't
> present in mainline?
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/sound/soc/txx9/txx9aclc-ac97.c?id=3bed3344c82623f6a37f3032e307d9af5b2d7519
---
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe
2014-02-16 2:55 ` Alexander Shiyan
@ 2014-02-18 1:18 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-02-18 1:18 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Takashi Iwai, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 656 bytes --]
On Sun, Feb 16, 2014 at 06:55:53AM +0400, Alexander Shiyan wrote:
> Воскресенье, 16 февраля 2014, 8:38 +08:00 от Mark Brown <broonie@kernel.org>:
> > On Sat, Feb 15, 2014 at 11:28:29PM +0400, Alexander Shiyan wrote:
> > > This patch fixes a crash caused by commit af5b2d7519
> > I don't know where you got that hash from by the way, that commit isn't
> > present in mainline?
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/sound/soc/txx9/txx9aclc-ac97.c?id=3bed3344c82623f6a37f3032e307d9af5b2d7519
A shortened commit ID is the *start* of the ID, not the end. Try
running 'git show af5b2d7519'.
[-- 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] 5+ messages in thread
end of thread, other threads:[~2014-02-18 1:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 19:28 [PATCH] ASoC: txx9aclc_ac97: Fix kernel crash on probe Alexander Shiyan
2014-02-16 0:36 ` Mark Brown
2014-02-16 0:38 ` Mark Brown
2014-02-16 2:55 ` Alexander Shiyan
2014-02-18 1:18 ` 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.