]> Git Repo - qemu.git/commitdiff
vfio/ccw: allocate irq info with the right size
authorJing Zhang <[email protected]>
Tue, 18 Jul 2017 01:49:25 +0000 (03:49 +0200)
committerCornelia Huck <[email protected]>
Tue, 25 Jul 2017 07:17:42 +0000 (09:17 +0200)
When allocating memory for the vfio_irq_info parameter of the
VFIO_DEVICE_GET_IRQ_INFO ioctl, we used the wrong size. Let's
fix it by using the right size.

Reviewed-by: Dong Jia Shi <[email protected]>
Signed-off-by: Jing Zhang <[email protected]>
Signed-off-by: Dong Jia Shi <[email protected]>
Message-Id: <20170718014926[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
hw/vfio/ccw.c

index 12d02623365168e4cba93f198fefd2e3d27573a6..8d97b53e776b37ff7308ff33c74802207083f093 100644 (file)
@@ -168,7 +168,7 @@ static void vfio_ccw_register_io_notifier(VFIOCCWDevice *vcdev, Error **errp)
         return;
     }
 
         return;
     }
 
-    argsz = sizeof(*irq_set);
+    argsz = sizeof(*irq_info);
     irq_info = g_malloc0(argsz);
     irq_info->index = VFIO_CCW_IO_IRQ_INDEX;
     irq_info->argsz = argsz;
     irq_info = g_malloc0(argsz);
     irq_info->index = VFIO_CCW_IO_IRQ_INDEX;
     irq_info->argsz = argsz;
This page took 0.022834 seconds and 4 git commands to generate.