Re: [libvirt] [PATCH] qemu: hotplug: ensure address generation for vfio-ccw

2019-11-03 Thread Bjoern Walk
Bjoern Walk [2019-10-28, 09:06AM +0100]: > When attaching a mediated host device of model vfio-ccw without > specifying a guest-address, none is generated by libvirt. Let's fix this > and make sure to generate a device address during live-hotplug. I know we are already in freeze, but it still wou

[libvirt] [PATCH 8/8] tests: Fix logic to not have possible NULL deref

2019-11-03 Thread John Ferlan
It's possible that virBitmapNewString returns NULL with an error string (and not an allocation failure that would abort); however, if virBitmapToString is called with a NULL @bitmap, then it will fail in an ugly manner. So rather than have if (!map && !str) logic, split the checks for each variable

[libvirt] [PATCH 7/8] tests: Add return value check in checkUserInfo

2019-11-03 Thread John Ferlan
Commit 1c8113f9c added the call to virTypedParamsGetString without a return value check which caused Coverity to complain especially since other checks for the same function are made. Found by Coverity Signed-off-by: John Ferlan --- tests/qemuagenttest.c | 4 +++- 1 file changed, 3 insertions(+

[libvirt] [PATCH 0/8] Coverity related patches

2019-11-03 Thread John Ferlan
Some related to "new-ish" changes that have caused Coverity to discover new issues and some from older changes from a pile of 50 or so that are not essentially "false positives". John Ferlan (8): vbox: Fix possible NULL deref conf: Remove ATTRIBUTE_NONNULL for virDomainQemuMonitorEventNew te

[libvirt] [PATCH 4/8] lxc: Remove unnecessary comment

2019-11-03 Thread John Ferlan
Commit 66e2adb2ba moved the code and the coverity comment which now was useless since the context was in lxcContainerSetupPivotRoot. Signed-off-by: John Ferlan --- src/lxc/lxc_container.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c in

[libvirt] [PATCH 2/8] conf: Remove ATTRIBUTE_NONNULL for virDomainQemuMonitorEventNew

2019-11-03 Thread John Ferlan
Commit 17561eb36 modified the logic to check "if (!event)" for an attribute that was not supposed to be passed as NULL. This causes the static checker/Coverity build to fail. Since the check is made, alter the header. Also add an error message since returning -1 without some sort of error message

[libvirt] [PATCH 1/8] vbox: Fix possible NULL deref

2019-11-03 Thread John Ferlan
The @valueTypeUtf8 references need to use the STREQ_NULLABLE since they're variantly filled in by @valueTypeUtf16. Found by Coverity. Signed-off-by: John Ferlan --- src/vbox/vbox_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/v

[libvirt] [PATCH 6/8] qemu: Fix possible NULL deref in qemuDomainSaveImageStartVM

2019-11-03 Thread John Ferlan
Commit 075523438 added a direct reference to @cookie even though it may be NULL as shown by a comment a few lines previous - so add the check here as well. Found by Coverity Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[libvirt] [PATCH 5/8] tests: Remove _NULLABLE in virNetDevExists mock

2019-11-03 Thread John Ferlan
The @ifname is listed as an ATTRIBUTE_NONNULL(1) parameter, so checking for _NULLABLE causes a coverity build failure - remove that and if it's NULL for the test let's fail miserably. Signed-off-by: John Ferlan --- tests/qemuxml2argvmock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[libvirt] [PATCH 3/8] tests: Fix memory leak in mymain

2019-11-03 Thread John Ferlan
Commit 944a35d7f0 added @fakerootdir; however, there are multiple paths out of mymain that didn't free the memory - so just use the g_autofree to resolve the potential leak. Found by Coverity Signed-off-by: John Ferlan --- tests/qemuhotplugtest.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet