Prechádzať zdrojové kódy

xen/mmu: weaken flush_tlb_other test

Impact: fixes crashing bug

There's no particular problem with getting an empty cpu mask,
so just shortcut-return if we get one.

Avoids crash reported by Christophe Saout <christophe@saout.de>

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Jeremy Fitzhardinge 16 rokov pred
rodič
commit
8de07bbded
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      arch/x86/xen/mmu.c

+ 2 - 2
arch/x86/xen/mmu.c

@@ -1293,8 +1293,8 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
 	} *args;
 	} *args;
 	struct multicall_space mcs;
 	struct multicall_space mcs;
 
 
-	BUG_ON(cpumask_empty(cpus));
-	BUG_ON(!mm);
+	if (cpumask_empty(cpus))
+		return;		/* nothing to do */
 
 
 	mcs = xen_mc_entry(sizeof(*args));
 	mcs = xen_mc_entry(sizeof(*args));
 	args = mcs.args;
 	args = mcs.args;