mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/mem_sharing: fix uninitialized 'preempted' variable
UBSAN catches an uninitialized use of the 'preempted' variable in
fork_hap_allocation when there is no preemption.
Fixes: 41548c5472 ("mem_sharing: VM forking")
Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
1839011c7e
commit
cb34a2fa16
1 file changed
+1
-1
@@ -1644,7 +1644,7 @@ static int copy_vcpu_settings(struct domain *cd, const struct domain *d)
|
||||
static int fork_hap_allocation(struct domain *cd, struct domain *d)
|
||||
{
|
||||
int rc;
|
||||
bool preempted;
|
||||
bool preempted = false;
|
||||
unsigned long mb = hap_get_allocation(d);
|
||||
|
||||
if ( mb == hap_get_allocation(cd) )
|
||||
|
||||