[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/sched: fix get_cpu_idle_time() with core scheduling
On Thu, 2020-02-13 at 15:35 +0100, Juergen Gross wrote: > get_cpu_idle_time() is calling vcpu_runstate_get() for an idle vcpu. > With core scheduling active this is fragile, as idle vcpus are > assigned > to other scheduling units temporarily, and that assignment is changed > in some cases without holding the scheduling lock, and > vcpu_runstate_get() is using v->sched_unit as parameter for > unit_schedule_[un]lock_irq(), resulting in an ASSERT() triggering in > unlock in case v->sched_unit has changed meanwhile. > > Fix that by using a local unit variable holding the correct unit. > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> > Reviewed-by: Dario Faggioli <dfaggioli@xxxxxxxx> And... > I have verified that all other uses of v->sched_unit are not > problematic: they are all for non-idle vcpus, or in scheduling paths > dealing with scheduling themselves and thus being aware of the > potential problem or not vulnerable by it. > ... Thanks for having done this as well. :-) Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |