-
Notifications
You must be signed in to change notification settings - Fork 349
lib_manager: Set of small fixes for loadable modules (sp1) #9962
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
Merged
Conversation
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
Extend the lib_manager_get_instance_bss_address function to also return the size of the bss section. This simplify the lib_manager_allocate_module_instance and lib_manager_free_module_instance functions. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Remove redundant value assignment to ops.prepare in the lib_manager_register_module function. This value is already set by the lib_manager_prepare_module_adapter function. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Free allocated driver structure when an unsupported loadable module api version is detected. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add verification of the module id passed as a parameter to the lib_manager_get_mod_ctx function. Add error handling to the lib_manager_free_module function. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add missing memory deallocation in the error handling code of the module_adapter_new function. This memory can be allocated by the module_adapter_init_data function. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Remove unnecessary call lib_manager_free_module from the modules_free function. Module release is already handled by lib_manager. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
d670ffa to
0b811e6
Compare
lgirdwood
approved these changes
Apr 9, 2025
Member
lgirdwood
left a comment
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.
Simplification is always good !
tmleman
approved these changes
Apr 9, 2025
serhiy-katsyuba-intel
approved these changes
Apr 9, 2025
jsarha
approved these changes
Apr 10, 2025
Member
|
rerun CI, its missing test results. |
Member
|
SOFCI TEST |
dbaluta
approved these changes
Apr 10, 2025
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.
Simplyfy module instance allocate functions by extend the
lib_manager_get_instance_bss_address functionto also return the size of thebsssection. This simplify thelib_manager_allocate_module_instanceandlib_manager_free_module_instancefunctions.Remove redundant value assignment to
ops.preparein thelib_manager_register_modulefunction. This value is already set by thelib_manager_prepare_module_adapterfunction.Fix memory leak in lib_manager_register_module - free allocated driver structure when an unsupported loadable module api version is detected.
Add verification of the module id passed as a parameter to the
lib_manager_get_mod_ctxfunction. Add error handling to thelib_manager_free_modulefunction.Fix memory leak in
module_adapter_new- add missing memory deallocation in the error handling code. This memory can be allocated by themodule_adapter_init_datafunction.Remove unnecessary call
lib_manager_free_modulefrom themodules_freefunction. Module release is already handled by lib_manager.