ASoC: intel: cml_rt1011_rt5682: find dai link with dai link name#2174
Closed
bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
Closed
ASoC: intel: cml_rt1011_rt5682: find dai link with dai link name#2174bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
Conversation
This was referenced Jun 8, 2020
plbossart
requested changes
Jun 8, 2020
Member
plbossart
left a comment
There was a problem hiding this comment.
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.
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>
7a9fecd to
4521c21
Compare
Collaborator
Author
|
change log: change commit message only, not touching the code itself |
Collaborator
@bardliao can we close this now? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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