# HG changeset patch # User Wei Huang # Date 1281377209 18000 # Node ID 79f9fc596a8f8cfc420b235873c9947f2743a49a # Parent 8992134dcfd0b9e1e86f4111e68a8aa48bd33c3c Spin lock error when updating domain node affinity This patch fixes the IRQ issue introduced by changset 21914. The BUG_ON in check_on() was triggered when domain_update_node_affinity() is called. Signed-off-by: Wei Huang diff -r 8992134dcfd0 -r 79f9fc596a8f xen/common/domain.c --- a/xen/common/domain.c Wed Aug 04 19:24:17 2010 +0100 +++ b/xen/common/domain.c Mon Aug 09 13:06:49 2010 -0500 @@ -351,8 +351,9 @@ nodemask_t nodemask = NODE_MASK_NONE; struct vcpu *v; unsigned int node; + unsigned long flags; - spin_lock(&d->node_affinity_lock); + spin_lock_irqsave(&d->node_affinity_lock, flags); for_each_vcpu ( d, v ) cpus_or(cpumask, cpumask, v->cpu_affinity); @@ -362,7 +363,7 @@ node_set(node, nodemask); d->node_affinity = nodemask; - spin_unlock(&d->node_affinity_lock); + spin_unlock_irqrestore(&d->node_affinity_lock, flags); }