-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASoC: amd: acp: Fix possible deadlock #5304
ASoC: amd: acp: Fix possible deadlock #5304
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>
@thesofproject/amd please have a look. This is only compile tested |
@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? |
@dbaluta looks like a false positive but perhaps will can init the ref_params to {} to silence the static analyzer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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")