Skip to content
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

xen-dom-mgmt: improvements for dom0 initcall #65

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

firscity
Copy link
Collaborator

@firscity firscity commented Apr 11, 2024

Contains changes suggested in #63

Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

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

Acked-by: Volodymyr Babchuk <[email protected]>

Redundant k_free() call was spuriously added to dom0 initcall, which
may lead to double-free problems with CONFIG_XSTAT.

Signed-off-by: Dmytro Firsov <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
Some return codes in dom0 initcall were ignored. Also return value
from initcall was improper (positive integer from last call, when
Zephyr initcall expects it to be 0 in success case).
Add error handling in initcall and add proper return value xs_init_root
to return proper result to initcall instead of just 0.

Signed-off-by: Dmytro Firsov <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
Result from xstat sysctl was tested on 0, which stands for 0 active
domains. This condition is theoretically impossible in Dom0 and
definitely not a valid state, so change it to ASSERT instead of
if condition.

Signed-off-by: Dmytro Firsov <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
@firscity firscity force-pushed the dom0_initcall_fixes branch from ed014cd to 6520983 Compare April 15, 2024 10:48
@firscity firscity merged commit 4c238f8 into xen-troops:main Apr 16, 2024
8 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.

2 participants