Skip to content

Conversation

@serhiy-katsyuba-intel
Copy link
Contributor

Buffer has to be disconnected from both components before being freed.

Buffer is usually freed at unbind. However, if unbind was not called before pipeline delete (e.g., because of a driver or test bug) buffer is freed at ipc_pipeline_module_free(). Without this fix buffer is freed without being disconnected from its source component and then several lines below at ipc_comp_free() the component disconnects itself from any buffers and so writes to already freed struct comp_buffer.

This problem seems to be a regression introduced by this commit: 8aa90d6

Buffer has to be disconnected from both components before being freed.

Buffer is usually freed at unbind. However, if unbind was not called
before pipeline delete (e.g., because of a driver or test bug) buffer is
freed at ipc_pipeline_module_free(). Without this fix buffer is freed
without being disconnected from its source component and then several
lines below at ipc_comp_free() the component disconnects itself from any
buffers and so writes to already freed struct comp_buffer.

This problem seems to be a regression introduced by this commit:
8aa90d6

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Copy link
Contributor

@tmleman tmleman left a comment

Choose a reason for hiding this comment

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

Great catch!
BTW, the unit test failure is unrelated to this pull request.

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 1, 2025

SOFCI TEST

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 1, 2025

Jenkins builder hit a networking issue and sof-ci/jenkins/pr-build was stuff. Restarting..

@lgirdwood lgirdwood merged commit 79a617e into thesofproject:main Dec 2, 2025
38 of 42 checks passed
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.

6 participants