From: Jens Freimann Date: Mon, 6 Feb 2012 09:59:05 +0000 (+0100) Subject: KVM: s390: ignore sigp stop overinitiative X-Git-Tag: MMI-PSA29.97-13-9~17141^2~26 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24a13044a84be51a6a4885a72ac9d5f4ed0742d0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git KVM: s390: ignore sigp stop overinitiative In __inject_sigp_stop() do nothing when the CPU is already in stopped state. Signed-off-by: Jens Freimann Signed-off-by: Christian Borntraeger Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index c703b1cbb0aa..f3d5cc297012 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c @@ -160,12 +160,15 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action) inti->type = KVM_S390_SIGP_STOP; spin_lock_bh(&li->lock); + if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) + goto out; list_add_tail(&inti->list, &li->list); atomic_set(&li->active, 1); atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags); li->action_bits |= action; if (waitqueue_active(&li->wq)) wake_up_interruptible(&li->wq); +out: spin_unlock_bh(&li->lock); return 0; /* order accepted */