Commit d6e1712b authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'vfio-v6.10' of https://github.com/awilliam/linux-vfio

Pull VFIO fix from Alex Williamson:

 - Recent stable backports are exposing a bug introduced in the v6.10
   development cycle where a counter value is uninitialized.  This leads
   to regressions in userspace drivers like QEMU where where the kernel
   might ask for an arbitrary buffer size or return out of memory itself
   based on a bogus value.  Zero initialize the counter.  (Yi Liu)

* tag 'vfio-v6.10' of https://github.com/awilliam/linux-vfio:
  vfio/pci: Init the count variable in collecting hot-reset devices
parents f6963ab4 5a88a3f6
...@@ -1260,7 +1260,7 @@ static int vfio_pci_ioctl_get_pci_hot_reset_info( ...@@ -1260,7 +1260,7 @@ static int vfio_pci_ioctl_get_pci_hot_reset_info(
struct vfio_pci_hot_reset_info hdr; struct vfio_pci_hot_reset_info hdr;
struct vfio_pci_fill_info fill = {}; struct vfio_pci_fill_info fill = {};
bool slot = false; bool slot = false;
int ret, count; int ret, count = 0;
if (copy_from_user(&hdr, arg, minsz)) if (copy_from_user(&hdr, arg, minsz))
return -EFAULT; return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment