From: Oscar Date: Mon, 25 Feb 2013 00:15:04 +0000 (-0500) Subject: null check in host_sched_yield X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=36a068547bf2342c7b7a29058df4cc8e0ff56291;p=palacios.git null check in host_sched_yield --- diff --git a/palacios/src/palacios/vmm_scheduler.c b/palacios/src/palacios/vmm_scheduler.c index 5631890..f4366cd 100644 --- a/palacios/src/palacios/vmm_scheduler.c +++ b/palacios/src/palacios/vmm_scheduler.c @@ -218,9 +218,11 @@ void host_sched_yield(struct guest_info * core, int usec) { } else { V3_Sleep(usec); } - yield_start_cycle = (uint64_t) core->sched_priv_data - + (uint64_t)core->vm_info->sched_priv_data; - core->sched_priv_data = (void *)yield_start_cycle; + if(core){ + yield_start_cycle = (uint64_t) core->sched_priv_data + + (uint64_t)core->vm_info->sched_priv_data; + core->sched_priv_data = (void *)yield_start_cycle; + } }