Skip to content

ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec c… - #2173

Merged
plbossart merged 3 commits into
thesofproject:topic/sof-devfrom
fredoh9:fix/cml_helios_rt5682_probe
Jun 9, 2020
Merged

ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec c…#2173
plbossart merged 3 commits into
thesofproject:topic/sof-devfrom
fredoh9:fix/cml_helios_rt5682_probe

Conversation

@fredoh9

@fredoh9 fredoh9 commented Jun 7, 2020

Copy link
Copy Markdown
Collaborator

…onfig

When the machine driver probe is deferred, the memory allocated
during probe seems to be corrupted causing the card registration to fail.

Instead of dynamic allocation for 4-channel config, statically define
2spk and 4spk and update config and codec component accordingly.

KASAN issue fixed.
[ 23.301373] cml_rt1011_rt5682 cml_rt1011_rt5682: sof_rt1011_quirk = f
[ 23.301875] ==================================================================
[ 23.302018] BUG: KASAN: use-after-free in snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[ 23.302178] Read of size 8 at addr ffff8881ec6acae0 by task kworker/0:2/105
[ 23.302320] CPU: 0 PID: 105 Comm: kworker/0:2 Not tainted 5.7.0-rc7-test+ #3
[ 23.302322] Hardware name: Google Helios/Helios, BIOS 01/21/2020
[ 23.302329] Workqueue: events deferred_probe_work_func
[ 23.302331] Call Trace:
[ 23.302339] dump_stack+0x76/0xa0
[ 23.302345] print_address_description.constprop.0.cold+0xd3/0x43e
[ 23.302351] ? _raw_spin_lock_irqsave+0x7b/0xd0
[ 23.302355] ? _raw_spin_trylock_bh+0xf0/0xf0
[ 23.302362] ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[ 23.302365] __kasan_report.cold+0x37/0x86
[ 23.302371] ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[ 23.302375] kasan_report+0x38/0x50
[ 23.302382] snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[ 23.302389] platform_drv_probe+0x66/0xc0

Suggested-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
Signed-off-by: Fred Oh fred.oh@linux.intel.com

fixes: #2168

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][CML] "ASoC: Neither/both codec name/of_node are set for SSP1-Codec" shows when boot up system

5 participants