Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: s390: vsie: Fix refcount overflow for shadow gmaps

In most cases gmap_put() was not called when it should have.

Add the missing gmap_put() in vsie_run().

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

+3 -1
+3 -1
arch/s390/kvm/vsie.c
··· 1328 1328 static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) 1329 1329 { 1330 1330 struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s; 1331 - struct gmap *sg; 1331 + struct gmap *sg = NULL; 1332 1332 int rc = 0; 1333 1333 1334 1334 while (1) { ··· 1368 1368 sg = gmap_put(sg); 1369 1369 cond_resched(); 1370 1370 } 1371 + if (sg) 1372 + sg = gmap_put(sg); 1371 1373 1372 1374 if (rc == -EFAULT) { 1373 1375 /*