* [Qemu-devel] [PATCH] vfio/pci: Fix failure to close file descriptor on error
@ 2018-08-21 18:58 Alex Williamson
2018-08-22 2:49 ` Peter Xu
0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2018-08-21 18:58 UTC (permalink / raw)
To: qemu-devel
A new error path fails to close the device file descriptor when
triggered by a ballooning incompatibility within the group. Fix it.
Fixes: 238e91728503 ("vfio/ccw/pci: Allow devices to opt-in for ballooning")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/vfio/common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 3f31f80b1280..7c185e5a2e79 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -1432,6 +1432,7 @@ int vfio_get_device(VFIOGroup *group, const char *name,
if (!QLIST_EMPTY(&group->device_list)) {
error_setg(errp,
"Inconsistent device balloon setting within group");
+ close(fd);
return -1;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] vfio/pci: Fix failure to close file descriptor on error
2018-08-21 18:58 [Qemu-devel] [PATCH] vfio/pci: Fix failure to close file descriptor on error Alex Williamson
@ 2018-08-22 2:49 ` Peter Xu
0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2018-08-22 2:49 UTC (permalink / raw)
To: Alex Williamson; +Cc: qemu-devel
On Tue, Aug 21, 2018 at 12:58:53PM -0600, Alex Williamson wrote:
> A new error path fails to close the device file descriptor when
> triggered by a ballooning incompatibility within the group. Fix it.
>
> Fixes: 238e91728503 ("vfio/ccw/pci: Allow devices to opt-in for ballooning")
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Regards,
--
Peter Xu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-22 2:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-21 18:58 [Qemu-devel] [PATCH] vfio/pci: Fix failure to close file descriptor on error Alex Williamson
2018-08-22 2:49 ` Peter Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.