]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: fix handling of write errors in the tpi handler
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Wed, 4 Feb 2015 14:53:42 +0000 (15:53 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 6 Mar 2015 12:40:33 +0000 (13:40 +0100)
commitcfd87a2af0b7af09acaff680dffbe31d083e57b8
treeb4c67ed384402a61f05c69a7ef6ae4ee20228162
parent6e35b37d165266e2171d890cfa034404ea6bae99
KVM: s390: fix handling of write errors in the tpi handler

If the I/O interrupt could not be written to the guest provided
area (e.g. access exception), a program exception was injected into the
guest but "inti" wasn't freed, therefore resulting in a memory leak.

In addition, the I/O interrupt wasn't reinjected. Therefore the dequeued
interrupt is lost.

This patch fixes the problem while cleaning up the function and making the
cc and rc logic easier to handle.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/priv.c