ASoC: amd: acp: Fix possible deadlock#5304
Merged
bardliao merged 1 commit intothesofproject:topic/sof-devfrom Jan 23, 2025
dbaluta:fix_deadlock_amd
Merged
ASoC: amd: acp: Fix possible deadlock#5304bardliao merged 1 commit intothesofproject:topic/sof-devfrom dbaluta:fix_deadlock_amd
bardliao merged 1 commit intothesofproject:topic/sof-devfrom
dbaluta:fix_deadlock_amd
Conversation
On error path, function acp_i2s_set_tdm_slot returns without releasing the lock and this could result in potential deadlocks in the future. Error reported by sparse: sound/soc/amd/acp/acp-i2s.c:95:12: error: context imbalance in 'acp_i2s_set_tdm_slot' - different lock contexts for basic block Fixes: cd60dec ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id") Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Collaborator
Author
|
@thesofproject/amd please have a look. This is only compile tested |
Collaborator
Author
|
@lgirdwood there is still one issue reported by static checkers. https://github.com/thesofproject/linux/actions/runs/12911457389/job/36003910540?pr=5304 but I wasn't able to understand where is the problem. Could be a false positive? |
ranj063
approved these changes
Jan 22, 2025
Collaborator
@dbaluta looks like a false positive but perhaps will can init the ref_params to {} to silence the static analyzer? |
plbossart
approved these changes
Jan 22, 2025
bardliao
approved these changes
Jan 23, 2025
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.
On error path, function acp_i2s_set_tdm_slot returns without releasing the lock and this could result in potential deadlocks in the future.
Error reported by sparse:
sound/soc/amd/acp/acp-i2s.c:95:12: error: context imbalance in 'acp_i2s_set_tdm_slot' - different lock contexts for basic block
Fixes: cd60dec ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id")