aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-04-01 17:08:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-04-01 17:08:48 +0100
commit415fa2fe91e2a49fe8d56d6aacc8f8db82c74775 (patch)
tree69112f0167a7926dc7d735b9c2dbd879f6720fc2 /util
parent00084bab87c43be20638de7f191d1a1faed134cc (diff)
parentd3a0bb7706520928f8493fabaee76532b5b1adb4 (diff)
Merge remote-tracking branch 'remotes/marcandre/tags/for-6.0-pull-request' into staging
For 6.0 misc patches under my radar. V2: - "tests: Add tests for yank with the chardev-change case" updated - drop the readthedoc theme patch # gpg: Signature made Thu 01 Apr 2021 12:54:52 BST # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/marcandre/tags/for-6.0-pull-request: tests: Add tests for yank with the chardev-change case chardev: Fix yank with the chardev-change case chardev/char.c: Always pass id to chardev_new chardev/char.c: Move object_property_try_add_child out of chardev_new yank: Always link full yank code yank: Remove dependency on qiochannel docs: simplify each section title dbus-vmstate: Increase the size of input stream buffer used during load util: fix use-after-free in module_load_one Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/meson.build2
-rw-r--r--util/module.c3
-rw-r--r--util/yank.c8
3 files changed, 3 insertions, 10 deletions
diff --git a/util/meson.build b/util/meson.build
index 984fba965f..510765cde4 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -43,6 +43,7 @@ util_ss.add(files('stats64.c'))
util_ss.add(files('systemd.c'))
util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c'))
util_ss.add(files('guest-random.c'))
+util_ss.add(files('yank.c'))
if have_user
util_ss.add(files('selfmap.c'))
@@ -51,7 +52,6 @@ endif
if have_system
util_ss.add(files('crc-ccitt.c'))
util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio])
- util_ss.add(files('yank.c'))
util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c'))
endif
diff --git a/util/module.c b/util/module.c
index cbe89fede6..7661d0f623 100644
--- a/util/module.c
+++ b/util/module.c
@@ -230,10 +230,11 @@ bool module_load_one(const char *prefix, const char *lib_name, bool mayfail)
}
}
- if (!g_hash_table_add(loaded_modules, module_name)) {
+ if (g_hash_table_contains(loaded_modules, module_name)) {
g_free(module_name);
return true;
}
+ g_hash_table_add(loaded_modules, module_name);
search_dir = getenv("QEMU_MODULE_DIR");
if (search_dir != NULL) {
diff --git a/util/yank.c b/util/yank.c
index fc08f65209..abf47c346d 100644
--- a/util/yank.c
+++ b/util/yank.c
@@ -15,7 +15,6 @@
#include "qapi/qapi-commands-yank.h"
#include "qapi/qapi-visit-yank.h"
#include "qapi/clone-visitor.h"
-#include "io/channel.h"
#include "qemu/yank.h"
struct YankFuncAndParam {
@@ -151,13 +150,6 @@ void yank_unregister_function(const YankInstance *instance,
abort();
}
-void yank_generic_iochannel(void *opaque)
-{
- QIOChannel *ioc = QIO_CHANNEL(opaque);
-
- qio_channel_shutdown(ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL);
-}
-
void qmp_yank(YankInstanceList *instances,
Error **errp)
{