diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2019-06-04 05:31:02 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-06 18:24:49 +0200 |
commit | 70fc53734e71ce51f46dfcfd1a1c319e1cfe080c (patch) | |
tree | 53eb9aece6ae4be5ade00e290d3c2ec6661d23bc /Documentation/trace/events-msr.rst | |
parent | ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override (diff) | |
download | linux-70fc53734e71ce51f46dfcfd1a1c319e1cfe080c.tar.xz linux-70fc53734e71ce51f46dfcfd1a1c319e1cfe080c.zip |
ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card
Kernel crashes when an ASoC component rebinding.
The dai_link->platforms has been reset to NULL by soc_cleanup_platform()
in soc_cleanup_card_resources() when un-registering component. However,
it has no chance to re-allocate the dai_link->platforms when registering
the component again.
Move the DAI pre-links initiation from snd_soc_register_card() to
snd_soc_instantiate_card() to make sure all DAI pre-links get initiated
when component rebinding.
As an example, by using the following commands:
- echo -n max98357a > /sys/bus/platform/drivers/max98357a/unbind
- echo -n max98357a > /sys/bus/platform/drivers/max98357a/bind
Got the error message:
"Unable to handle kernel NULL pointer dereference at virtual address".
The call trace:
snd_soc_is_matching_component+0x30/0x6c
soc_bind_dai_link+0x16c/0x240
snd_soc_bind_card+0x1e4/0xb10
snd_soc_add_component+0x270/0x300
snd_soc_register_component+0x54/0x6c
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/trace/events-msr.rst')
0 files changed, 0 insertions, 0 deletions