Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d514f426 authored by Christian Borntraeger's avatar Christian Borntraeger
Browse files

KVM: s390: Fix memory leak on busy SIGP stop



commit 7dfc63cf
(KVM: s390: allow only one SIGP STOP (AND STORE STATUS) at a time)
introduced a memory leak if a sigp stop is already pending. Free
the allocated inti structure.

Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
parent b55a8144
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -139,6 +139,7 @@ static int __inject_sigp_stop(struct kvm_vcpu *dst_vcpu, int action)
	spin_lock(&li->lock);
	spin_lock(&li->lock);
	if (li->action_bits & ACTION_STOP_ON_STOP) {
	if (li->action_bits & ACTION_STOP_ON_STOP) {
		/* another SIGP STOP is pending */
		/* another SIGP STOP is pending */
		kfree(inti);
		rc = SIGP_CC_BUSY;
		rc = SIGP_CC_BUSY;
		goto out;
		goto out;
	}
	}