Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Apr 1, 2025

Fix a memory-leak from #9940 and a mis-calculated writable data size.

Take .bss into account when unmapping, similarly to mapping.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

LGTM, just one question

continue;

/* First user of this dependency, load it into SRAM */
ret = llext_manager_load_module(dep);
Copy link
Member

Choose a reason for hiding this comment

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

do we need to decrement n_dependent on loading failure ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rrright, good catch! Updated.

Auxiliary modules have to be unloaded when the last user is freed.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lgirdwood lgirdwood merged commit ccd02ec into thesofproject:main Apr 2, 2025
44 of 49 checks passed
@lyakh lyakh deleted the leak branch April 2, 2025 09:36
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