aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2014-07-28 05:52:02 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-07-30 09:29:40 -0400
commitd514f42641e1976e9eae6ea500c13274e62cdba3 (patch)
treefc8543045da6609c3ee607fbf9abe49acc84ac37 /arch/s390/kvm
parentb55a8144d1807f9e74c51cb584f0dd198483d86c (diff)
KVM: s390: Fix memory leak on busy SIGP stop
commit 7dfc63cf977447e09b1072911c22564f900fc578 (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: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/sigp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index c6f1c2bc9753..cf243ba3d50f 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -139,6 +139,7 @@ static int __inject_sigp_stop(struct kvm_vcpu *dst_vcpu, int action)
139 spin_lock(&li->lock); 139 spin_lock(&li->lock);
140 if (li->action_bits & ACTION_STOP_ON_STOP) { 140 if (li->action_bits & ACTION_STOP_ON_STOP) {
141 /* another SIGP STOP is pending */ 141 /* another SIGP STOP is pending */
142 kfree(inti);
142 rc = SIGP_CC_BUSY; 143 rc = SIGP_CC_BUSY;
143 goto out; 144 goto out;
144 } 145 }