Patch "KVM: s390: fix get_all_floating_irqs" has been added to the 4.0-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
KVM: s390: fix get_all_floating_irqs
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kvm-s390-fix-get_all_floating_irqs.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
94aa033efcac47b09db22cb561e135baf37b7887Mon Sep 17 00:00:00 2001
From: Jens Freimann <[email protected]>
Date: Mon, 16 Mar 2015 12:17:13 +0100
Subject: KVM: s390: fix get_all_floating_irqs
From: Jens Freimann <[email protected]>
commit 94aa033efcac47b09db22cb561e135baf37b7887 upstream.
This fixes a bug introduced with commit c05c4186bbe4 ("KVM: s390:
add floating irq controller").
get_all_floating_irqs() does copy_to_user() while holding a spin lock. Let's fix this by filling a temporary buffer first and copy it to userspace after giving up the lock.
--- Documentation/virtual/kvm/devices/s390_flic.txt | 3 + arch/s390/kvm/interrupt.c | 58 +++++++++++++----------- 2 files changed, 35 insertions(+), 26 deletions(-)
Documentation/virtual/kvm/devices/s390_flic.txt +3 -0
@@ -27,6 +27,9 @@ Groups: Copies all floating interrupts into a buffer provided by userspace. When the buffer is too small it returns -ENOMEM, which is the indication for userspace to try again with a bigger buffer. + -ENOBUFS is returned when the allocation of a kernelspace buffer has + failed. + -EFAULT is returned when copying data to userspace failed. All interrupts remain pending, i.e. are not deleted from the list of currently pending interrupts. attr->addr contains the userspace address of the buffer into which all
arch/s390/kvm/interrupt.c +32 -26
106 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-4.0/kvm-s390-fix-get_all_floating_irqs.patch