linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Thomas Huth <thuth@linux.vnet.ibm.com>
Subject: [PATCH 3.15 24/61] KVM: s390: Drop pending interrupts on guest exit
Date: Tue, 24 Jun 2014 11:51:07 -0400	[thread overview]
Message-ID: <20140624154953.873301308@linuxfoundation.org> (raw)
In-Reply-To: <20140624154952.751713761@linuxfoundation.org>

3.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christian Borntraeger <borntraeger@de.ibm.com>

commit 67335e63c9ef59e97b45a08b4a6a93767762031d upstream.

On hard exits (abort, sigkill) we have have some kvm_s390_interrupt_info
structures hanging around. Delete those on exit to avoid memory leaks.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/s390/kvm/interrupt.c |    4 ++--
 arch/s390/kvm/kvm-s390.c  |    2 ++
 arch/s390/kvm/kvm-s390.h  |    1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -900,7 +900,7 @@ int kvm_s390_inject_vcpu(struct kvm_vcpu
 	return 0;
 }
 
-static void clear_floating_interrupts(struct kvm *kvm)
+void kvm_s390_clear_float_irqs(struct kvm *kvm)
 {
 	struct kvm_s390_float_interrupt *fi;
 	struct kvm_s390_interrupt_info	*n, *inti = NULL;
@@ -1246,7 +1246,7 @@ static int flic_set_attr(struct kvm_devi
 		break;
 	case KVM_DEV_FLIC_CLEAR_IRQS:
 		r = 0;
-		clear_floating_interrupts(dev->kvm);
+		kvm_s390_clear_float_irqs(dev->kvm);
 		break;
 	case KVM_DEV_FLIC_APF_ENABLE:
 		dev->kvm->arch.gmap->pfault_enabled = 1;
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -322,6 +322,7 @@ void kvm_arch_vcpu_destroy(struct kvm_vc
 {
 	VCPU_EVENT(vcpu, 3, "%s", "free cpu");
 	trace_kvm_s390_destroy_vcpu(vcpu->vcpu_id);
+	kvm_s390_clear_local_irqs(vcpu);
 	kvm_clear_async_pf_completion_queue(vcpu);
 	if (!kvm_is_ucontrol(vcpu->kvm)) {
 		clear_bit(63 - vcpu->vcpu_id,
@@ -372,6 +373,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm
 	if (!kvm_is_ucontrol(kvm))
 		gmap_free(kvm->arch.gmap);
 	kvm_s390_destroy_adapters(kvm);
+	kvm_s390_clear_float_irqs(kvm);
 }
 
 /* Section: vcpu related */
--- a/arch/s390/kvm/kvm-s390.h
+++ b/arch/s390/kvm/kvm-s390.h
@@ -130,6 +130,7 @@ void kvm_s390_tasklet(unsigned long parm
 void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu);
 void kvm_s390_deliver_pending_machine_checks(struct kvm_vcpu *vcpu);
 void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu);
+void kvm_s390_clear_float_irqs(struct kvm *kvm);
 int __must_check kvm_s390_inject_vm(struct kvm *kvm,
 				    struct kvm_s390_interrupt *s390int);
 int __must_check kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu,



  parent reply	other threads:[~2014-06-24 16:05 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 15:50 [PATCH 3.15 00/61] 3.15.2-stable review Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 01/61] rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 02/61] target: Fix NULL pointer dereference for XCOPY in target_put_sess_cmd Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 03/61] iscsi-target: Reject mutual authentication with reflected CHAP_C Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 04/61] ima: audit log files opened with O_DIRECT flag Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 05/61] ima: introduce ima_kernel_read() Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 06/61] evm: prohibit userspace writing security.evm HMAC value Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 07/61] ipv6: Fix regression caused by efe4208 in udp_v6_mcast_next() Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 08/61] net: tunnels - enable module autoloading Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 09/61] sh_eth: use RNC mode for packet reception Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 10/61] sh_eth: fix SH7619/771x support Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 11/61] net: filter: fix typo in sparc BPF JIT Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 12/61] net: filter: fix sparc32 typo Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 14/61] net: force a list_del() in unregister_netdevice_many() Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 15/61] ipip, sit: fix ipv4_{update_pmtu,redirect} calls Greg Kroah-Hartman
2014-06-24 15:50 ` [PATCH 3.15 16/61] sfc: PIO:Restrict to 64bit arch and use 64-bit writes Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 17/61] ipv4: fix a race in ip4_datagram_release_cb() Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 18/61] sctp: Fix sk_ack_backlog wrap-around problem Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 19/61] rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 20/61] vxlan: use dev->needed_headroom instead of dev->hard_header_len Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 21/61] udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 22/61] ARM: at91: fix at91_sysirq_mask_rtc for sam9x5 SoCs Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 23/61] KVM: lapic: sync highest ISR to hardware apic on EOI Greg Kroah-Hartman
2014-06-24 15:51 ` Greg Kroah-Hartman [this message]
2014-06-24 15:51 ` [PATCH 3.15 25/61] MIPS: KVM: Allocate at least 16KB for exception handlers Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 26/61] USB: cdc-acm: fix write and suspend race Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 27/61] USB: cdc-acm: fix write and resume race Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 28/61] USB: cdc-acm: fix broken runtime suspend Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 29/61] USB: cdc-acm: fix runtime PM for control messages Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 30/61] USB: cdc-acm: fix shutdown and suspend race Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 31/61] USB: cdc-acm: fix potential urb leak and PM imbalance in write Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 32/61] USB: cdc-acm: fix open and suspend race Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 33/61] USB: cdc-acm: fix failed open not being detected Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 34/61] USB: cdc-acm: fix I/O after failed open Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 35/61] USB: cdc-acm: fix runtime PM imbalance at shutdown Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 36/61] Drivers: hv: balloon: Ensure pressure reports are posted regularly Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 38/61] ASoC: dapm: Make sure to always update the DAPM graph in _put_volsw() Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 39/61] ASoC: max98090: Fix reset at resume time Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 40/61] ASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() function Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 41/61] iio:adc:max1363 incorrect resolutions for max11604, max11605, max11610 and max11611 Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 42/61] staging: iio: tsl2x7x_core: fix proximity treshold Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 43/61] iio: adc: checking for NULL instead of IS_ERR() in probe Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 44/61] iio: mxs-lradc: fix divider Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 45/61] iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name() Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 46/61] iio: Fix endianness issue in ak8975_read_axis() Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 48/61] lzo: properly check for overruns Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 49/61] lz4: ensure length does not wrap Greg Kroah-Hartman
     [not found]   ` <CAFkuX4tQoRhsS2A5iJNWyMELs=sLhNx-m5Uq38R7fjSmGHfvvQ@mail.gmail.com>
2014-06-24 20:59     ` Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 50/61] ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 51/61] ALSA: hda/realtek - Add support of ALC891 codec Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 52/61] ALSA: hda/realtek - Add more entry for enable HP mute led Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 53/61] ALSA: hda - verify pin:converter connection on unsol event for HSW and VLV Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 55/61] ALSA: control: Protect user controls against concurrent access Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 56/61] ALSA: control: Fix replacing user controls Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 57/61] ALSA: control: Dont access controls outside of protected regions Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 58/61] ALSA: control: Handle numid overflow Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 59/61] ALSA: control: Make sure that id->index does not overflow Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 60/61] tmpfs: ZERO_RANGE and COLLAPSE_RANGE not currently supported Greg Kroah-Hartman
2014-06-24 15:51 ` [PATCH 3.15 61/61] slab: fix oops when reading /proc/slab_allocators Greg Kroah-Hartman
2014-06-24 19:50 ` [PATCH 3.15 00/61] 3.15.2-stable review Shuah Khan
2014-06-24 19:58   ` Greg Kroah-Hartman
2014-06-25  9:00   ` Satoru Takeuchi
2014-06-26 19:09     ` Greg Kroah-Hartman
2014-06-24 23:31 ` Guenter Roeck
2014-06-26 19:09   ` Greg Kroah-Hartman
2014-06-26 20:34     ` Guenter Roeck
2014-06-25 14:20 ` Benjamin LaHaise
2014-06-25 14:27   ` Josh Boyer
2014-06-26 19:09   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140624154953.873301308@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thuth@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).