Skip to content

ASoC: intel: cml_rt1011_rt5682: find dai link with dai link name#2174

Closed
bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
bardliao:strcmp-link-name
Closed

ASoC: intel: cml_rt1011_rt5682: find dai link with dai link name#2174
bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
bardliao:strcmp-link-name

Conversation

@bardliao
Copy link
Collaborator

@bardliao bardliao commented Jun 8, 2020

We assign cml_rt1011_rt5682_dailink[].codecs to a devm allocated
component in previous probe. The component could be freed.
So find dai link with codec dai_name is not reliable.

Signed-off-by: Bard Liao yung-chuan.liao@linux.intel.com

Fixes: #2168

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @bardliao but the commit message is far from clear. Should be something like.

When the cml_rt1011_rt5682_dailink[].codecs pointer is overridden by a quirk with a devm allocated structure and the probe is deferred, in the next probe we will see an use-after-free condition. This can be avoided by changing a test condition so that we don't test an invalid value.

Also we need a Fixes: tag, this should go to linux-stable.

component in previous probe. The component could be freed.
So find dai link with codec dai_name is not reliable.

bardliao added 2 commits June 9, 2020 09:09
When the cml_rt1011_rt5682_dailink[].codecs pointer is overridden by
a quirk with a devm allocated structure and the probe is deferred, in
the next probe we will see an use-after-free condition. This can be
avoided by changing a test condition so that we don't test an invalid
value.

Fixes: 629ba12 (ASoC: Intel: boards: split woofer and tweeter support)
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
for_each_card_prelinks() is a common API to walk through each prelink
in the card.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@bardliao bardliao force-pushed the strcmp-link-name branch from 7a9fecd to 4521c21 Compare June 9, 2020 01:11
@bardliao
Copy link
Collaborator Author

bardliao commented Jun 9, 2020

change log: change commit message only, not touching the code itself

@ranj063
Copy link
Collaborator

ranj063 commented Jun 9, 2020

change log: change commit message only, not touching the code itself

@bardliao can we close this now?

@bardliao bardliao closed this Jun 9, 2020
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

3 participants