On 24.11.25 23:35, Jason Andryuk wrote:
On a system without a control domain, a hardware|xenstore domain starting xenstored shows: common/grant_table.c:1041:d2v0 Could not find domain 32756 gnttab: error: mmap failed: Invalid argument Could not initialize dom32756setup_structure() does not get called without priv_domid. Subsequent introduce_domain() calls will fault when calling fire_special_watches(). Default priv_domid to store_domid when there is no control domain. Fixes: e5b0a9405571 ("tools/xenstored: Auto-introduce domains") Signed-off-by: Jason Andryuk <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
--- I didn't verify the segfault in fire_watches() in this situation, but I saw that previously when working on this. Regardless of the specific error, xenstored was not working properly without this change.
The segfault was probably really related to the missing call of setup_structure() in this case, as the nodes hashtable wouldn't be initialized. This will result in a NULL dereference as soon as any watch is tried to be fired when the existence of the related node (@introduceDomain in this case) is checked. Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
