Skip to content

chain-dma: fix potential NULL dereference #10955#10979

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
lyakh:chain
Jul 9, 2026
Merged

chain-dma: fix potential NULL dereference #10955#10979
lgirdwood merged 1 commit into
thesofproject:mainfrom
lyakh:chain

Conversation

@lyakh

@lyakh lyakh commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

It has been reported that upon resume certain userspace software tries to use chain DMA without proper initialisation. Prevent DSP exceptions by checking for such cases.

Link: #10955

It has been reported that upon resume certain userspace software
tries to use chain DMA without proper initialisation. Prevent DSP
exceptions by checking for such cases.

Link: thesofproject#10955
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the chain DMA component against resume-time misuse by userspace, preventing DSP exceptions when the host DMA channel has not been fully initialized (as reported in issue #10955).

Changes:

  • Add a guard in chain_host_start() to detect missing host DMA channel/controller initialization.
  • Return -ENODEV early (with an error log) instead of calling into dma_start() with invalid pointers.

Comment thread src/audio/chain_dma.c
@lyakh

lyakh commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

@lrudyX I see HDA codec not responding on MTL? and a silent DMIC file on PTL and one more DMIC test failure on PTL?

@lgirdwood

Copy link
Copy Markdown
Member

test this please

@lgirdwood

Copy link
Copy Markdown
Member

@lrudyX I see HDA codec not responding on MTL? and a silent DMIC file on PTL and one more DMIC test failure on PTL?

@lyakh will rerun to be sure.

@lyakh

lyakh commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@lrudyX this time two failures on PTL: random HDA DMA and DMIC error with "low quality" and "shorter than expected." None of them seem to be related to this PR.

@lgirdwood lgirdwood merged commit 030ec2f into thesofproject:main Jul 9, 2026
45 checks passed
@lyakh lyakh deleted the chain branch July 9, 2026 12:06
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.

3 participants