[alsa-devel] [PATCH v2] ASoC: max98090: save and restore SHDN when changing sensitive registers

Mark Brown broonie at kernel.org
Thu Dec 12 17:48:09 CET 2019


On Thu, Dec 12, 2019 at 05:02:50PM +0100, Marek Szyprowski wrote:
> On 12.12.2019 15:09, Marek Szyprowski wrote:

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> >> +static void max98090_shdn_save(struct max98090_priv *max98090)
> >> +{
> >> + mutex_lock(&max98090->component->card->dapm_mutex);

> The NULL pointer dereference demonstrated above is caused by 
> max98090->component->card being NULL here. Adding a simple != NULL check 
> here and in the max98090_shdn_restore() function fixes the boot issue, 
> although the deplock warning is still there. The question is that is the 
> max98090->component->card being NULL is a normal case or something that 
> needs further analysis.

It'd be good to get a bit more analysis, the _shdn_save() call looks to
have come from a userspace write and we shouldn't be exposing the card
and hence the controls on the card to userspace until it's fully
instantiated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20191212/0ab3b71c/attachment.sig>


More information about the Alsa-devel mailing list