- s390x/sclp: Simplify get_sclp_device() - target/ppc: Remove msr_pr macro - docs/system/target-arm: Re-alphabetize board list - migration: Extend query-migrate to provide dirty page limit info - migration: Implement dirty-limit convergence algo - migration: Put the detection logic before auto-converge checking - migration: Refactor auto-converge capability logic - migration: Introduce dirty-limit capability - qapi/migration: Introduce vcpu-dirty-limit parameters - qapi/migration: Introduce x-vcpu-dirty-limit-period parameter - Change the value of no_ged from true to false - Allow UNIX socket option for VNC websocket - tpm_emulator: Avoid double initialization during - chardev/char-socket: Update AF_UNIX for Windows - KVM: dirty ring: add missing memory barrier - i386: reset KVM nested state upon CPU reset - esp: Handle CMD_BUSRESET by resetting the SCSI bus - dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies - vfio/pci: Add Ascend310b scend910b support - target/i386: Export RFDS bit to guests - target/i386: Add new CPU model SierraForest - target/i386: Introduce Icelake-Server-v7 to enable TSX - hw/virtio: handle un-configured shutdown in virtio-pci - target/s390x: display deprecation status in '-cpu help' - target/i386: display deprecation status in '-cpu help' - pc-bios/s390-ccw: Fix booting with logical block size < physical block size Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
68 lines
2.6 KiB
Diff
68 lines
2.6 KiB
Diff
From a5a46593ade242686a670756530026914ed51eaf Mon Sep 17 00:00:00 2001
|
|
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
|
Date: Tue, 14 May 2024 09:27:10 +0000
|
|
Subject: [PATCH] dbus-vmstate: Restrict error checks to registered proxies in
|
|
dbus_get_proxies mainline inclusion commit
|
|
2748583211d6e4d14f8862c65276b2d6cc1681ad category: bugfix
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---------------------------------------------------------------
|
|
|
|
The purpose of dbus_get_proxies to construct the proxies corresponding to the
|
|
IDs registered to dbus-vmstate.
|
|
|
|
Currenty, this function returns an error in case there is any failure
|
|
while instantiating proxy for "all" the names on dbus.
|
|
|
|
Ideally this function should error out only if it is not able to find and
|
|
validate the proxies registered to the backend otherwise any offending
|
|
process(for eg: the process purposefully may not export its Id property on
|
|
the dbus) may connect to the dbus and can lead to migration failures.
|
|
|
|
This commit ensures that dbus_get_proxies returns an error if it is not
|
|
able to find and validate the proxies of interest(the IDs registered
|
|
during the dbus-vmstate instantiation).
|
|
|
|
Signed-off-by: Priyankar Jain <priyankar.jain@nutanix.com>
|
|
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Message-Id: <1637936117-37977-1-git-send-email-priyankar.jain@nutanix.com>
|
|
|
|
Signed-off-by: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
|
---
|
|
backends/dbus-vmstate.c | 13 +++++++++----
|
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/backends/dbus-vmstate.c b/backends/dbus-vmstate.c
|
|
index 9cfd758c42..57369ec0f2 100644
|
|
--- a/backends/dbus-vmstate.c
|
|
+++ b/backends/dbus-vmstate.c
|
|
@@ -114,14 +114,19 @@ dbus_get_proxies(DBusVMState *self, GError **err)
|
|
"org.qemu.VMState1",
|
|
NULL, err);
|
|
if (!proxy) {
|
|
- return NULL;
|
|
+ if (err != NULL && *err != NULL) {
|
|
+ warn_report("%s: Failed to create proxy: %s",
|
|
+ __func__, (*err)->message);
|
|
+ g_clear_error(err);
|
|
+ }
|
|
+ continue;
|
|
}
|
|
|
|
result = g_dbus_proxy_get_cached_property(proxy, "Id");
|
|
if (!result) {
|
|
- g_set_error_literal(err, G_IO_ERROR, G_IO_ERROR_FAILED,
|
|
- "VMState Id property is missing.");
|
|
- return NULL;
|
|
+ warn_report("%s: VMState Id property is missing.", __func__);
|
|
+ g_clear_object(&proxy);
|
|
+ continue;
|
|
}
|
|
|
|
id = g_variant_dup_string(result, &size);
|
|
--
|
|
2.27.0
|
|
|