aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorJens Freimann <jfrei@linux.vnet.ibm.com>2015-03-16 07:17:13 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-03-31 15:05:51 -0400
commit94aa033efcac47b09db22cb561e135baf37b7887 (patch)
tree2370d7dbd93fd307db16399de6229dbb0aa46d04 /Documentation/virtual
parenta3ed8dae6e3db479ca275883ba7fe994170b0ae6 (diff)
KVM: s390: fix get_all_floating_irqs
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. Cc: <stable@vger.kernel.org> # 3.18+: 69a8d4562638 KVM: s390: no need to hold... Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/devices/s390_flic.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/devices/s390_flic.txt b/Documentation/virtual/kvm/devices/s390_flic.txt
index 4ceef53164b0..d1ad9d5cae46 100644
--- a/Documentation/virtual/kvm/devices/s390_flic.txt
+++ b/Documentation/virtual/kvm/devices/s390_flic.txt
@@ -27,6 +27,9 @@ Groups:
27 Copies all floating interrupts into a buffer provided by userspace. 27 Copies all floating interrupts into a buffer provided by userspace.
28 When the buffer is too small it returns -ENOMEM, which is the indication 28 When the buffer is too small it returns -ENOMEM, which is the indication
29 for userspace to try again with a bigger buffer. 29 for userspace to try again with a bigger buffer.
30 -ENOBUFS is returned when the allocation of a kernelspace buffer has
31 failed.
32 -EFAULT is returned when copying data to userspace failed.
30 All interrupts remain pending, i.e. are not deleted from the list of 33 All interrupts remain pending, i.e. are not deleted from the list of
31 currently pending interrupts. 34 currently pending interrupts.
32 attr->addr contains the userspace address of the buffer into which all 35 attr->addr contains the userspace address of the buffer into which all