> On Nov 8, 2019, at 7:38 AM, Juergen Gross <jgr...@suse.com> wrote:
> 
> The assertions in csched2_free_pdata() are wrong as in case it is
> called by schedule_cpu_add() after a failure of sched_alloc_udata()
> the init pdata function won't have been called.

I’m a bit confused by this, as the comment says that the ASSERT()s should be OK 
with that case; i.e., that they should check *either* that pdata hasn’t been 
called, or that dinit_pdata() has been called:

> -     * xfree() does not really mind, but we want to be sure that either
> -     * init_pdata has never been called, or deinit_pdata has been called
> -     * already.

So which of the following conditions will fail if sched_alloc_udata() fails?  
It looks to me like they should both be fine.

> -    ASSERT(!pcpu || spc->runq_id == -1);
> -    ASSERT(!cpumask_test_cpu(cpu, &csched2_priv(ops)->initialized));

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to