diff options
author | Jens Freimann <jfrei@linux.vnet.ibm.com> | 2015-03-16 12:17:13 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-05-17 19:11:49 -0400 |
commit | 00d83726cc64e9a1e1e2f60471235e9cfaa86d1e (patch) | |
tree | 615fec12086ca6ab0db28d9c7ead59ef1ff8806b /Documentation | |
parent | 7e15bc0e1c8b239a82005a884b1bce9260024ecb (diff) | |
download | lwn-00d83726cc64e9a1e1e2f60471235e9cfaa86d1e.tar.gz lwn-00d83726cc64e9a1e1e2f60471235e9cfaa86d1e.zip |
KVM: s390: fix get_all_floating_irqs
[ Upstream commit 94aa033efcac47b09db22cb561e135baf37b7887 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/virtual/kvm/devices/s390_flic.txt | 3 |
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: 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 |