Skip to contentSkip to conversation

Bugfix for kvm/s390.

PATCH Applied Cornelia Huck 2 participants 3 messages Jan 15, 2013 – Jan 17, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bugfix for kvm/s390.

Hi,

here's another s390 bugfix for kvm-next. Please apply.

Cong Ding (1):
KVM: s390: kvm/sigp.c: fix memory leakage

 arch/s390/kvm/sigp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.12.4
#1 lore raw

PATCH 1/1 KVM: s390: kvm/sigp.c: fix memory leakage

From: Cong Ding <[email protected]>

the variable inti should be freed in the branch CPUSTAT_STOPPED.

---
 arch/s390/kvm/sigp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/s390/kvm/sigp.c +3 -1
index 461e841..1c48ab2 100644
@@ -137,8 +137,10 @@ 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))
+	if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) {
+		kfree(inti);
 		goto out;
+	}
 	list_add_tail(&inti->list, &li->list);
 	atomic_set(&li->active, 1);
 	atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags);
Signature · 1 line
1.7.12.4
Applied
#2 lore raw
In reply to Cornelia Huck
Quoted 4 lines · Cornelia Huck

Hi,

here's another s390 bugfix for kvm-next. Please apply.

Applied, thanks.

Quoted 8 lines

Cong Ding (1):
KVM: s390: kvm/sigp.c: fix memory leakage

 arch/s390/kvm/sigp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.12.4

--
Gleb.