From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: CX20442: fix NULL pointer dereference
Date: Tue, 01 Feb 2011 12:07:50 +0000 [thread overview]
Message-ID: <1296562070.4120.3.camel@dplaptop.localdomain> (raw)
In-Reply-To: <201102011301.17699.jkrzyszt@tis.icnet.pl>
On Tue, 2011-02-01 at 13:01 +0100, Janusz Krzysztofik wrote:
> The CX20442 codec driver never provided the snd_soc_codec_driver's
> .reg_cache_default member. With the latest ASoC framework changes, it
> seems to be referred unconditionally, resulting in a NULL pointer
> dereference if missing. Provide it.
This shouldn't happen with the latest ASoC as there is support for NULL
default caches. In particular the following code should be taking care
of the NULL pointer dereference
if (codec_drv->reg_cache_default) {
codec->reg_def_copy = kmemdup(...);
if (!codec->reg_def_copy) {
ret = -ENOMEM;
goto fail;
}
}
If this is not what soc-core looks like for you please pull broonie's
latest development tree.
Thanks,
Dimitris
next prev parent reply other threads:[~2011-02-01 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 12:01 [PATCH] ASoC: CX20442: fix NULL pointer dereference Janusz Krzysztofik
2011-02-01 12:07 ` Janusz Krzysztofik
2011-02-01 12:07 ` Dimitris Papastamos [this message]
2011-02-01 13:18 ` Janusz Krzysztofik
2011-02-01 13:19 ` Mark Brown
2011-02-01 14:30 ` Liam Girdwood
2011-02-01 14:31 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296562070.4120.3.camel@dplaptop.localdomain \
--to=dp@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jkrzyszt@tis.icnet.pl \
--cc=lrg@slimlogic.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).