Skip to content

Commit

Permalink
vfio/ccw: allocate irq info with the right size
Browse files Browse the repository at this point in the history
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: <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
  • Loading branch information
Jing Zhang authored and cohuck committed Jul 25, 2017
1 parent b5a74cd commit 28e22d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/vfio/ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static void vfio_ccw_register_io_notifier(VFIOCCWDevice *vcdev, Error **errp)
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;
Expand Down

0 comments on commit 28e22d4

Please sign in to comment.