Hi Juergen,
On 01/11/2022 15:28, Juergen Gross wrote:
static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod)
@@ -492,8 +504,12 @@ static struct domain
*find_or_alloc_existing_domain(unsigned int domid)
xc_dominfo_t dominfo;
domain = find_domain_struct(domid);
- if (!domain && get_domain_info(domid, &dominfo))
- domain = alloc_domain(NULL, domid);
+ if (!domain) {
+ if (!get_domain_info(domid, &dominfo))
+ errno = ENOENT;
+ else
+ domain = alloc_domain(NULL, domid);
+ }
I don't understand how this change is related to this commit.
[...]
+int acc_add_dom_nbentry(const void *ctx, struct list_head *head, int val,
+ unsigned int domid)
+{
+ struct changed_domain *cd;
+
+ cd = acc_get_changed_domain(ctx, head, domid);
+ if (!cd)
+ return errno;
+
+ cd->nbentry += val;
As a future improvement, it would be worth considering to check for
underflow/overflow.
Cheers,
--
Julien Grall