[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/6] module: Prevent crash by resetting local_err in module_load_q
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 5/6] module: Prevent crash by resetting local_err in module_load_qom_all() |
|
Date: |
Tue, 13 Aug 2024 19:05:54 +0200 |
From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Set local_err to NULL after it has been freed in error_report_err(). This
avoids triggering assert(*errp == NULL) failure in error_setv() when
local_err is reused in the loop.
Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Link:
20240809121340.992049-2-alexander.ivanov@virtuozzo.com">https://lore.kernel.org/r/20240809121340.992049-2-alexander.ivanov@virtuozzo.com
[Do the same by moving the declaration instead. - Paolo]
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
util/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/module.c b/util/module.c
index 32e263163c7..3eb0f06df16 100644
--- a/util/module.c
+++ b/util/module.c
@@ -354,13 +354,13 @@ int module_load_qom(const char *type, Error **errp)
void module_load_qom_all(void)
{
const QemuModinfo *modinfo;
- Error *local_err = NULL;
if (module_loaded_qom_all) {
return;
}
for (modinfo = module_info; modinfo->name != NULL; modinfo++) {
+ Error *local_err = NULL;
if (!modinfo->objs) {
continue;
}
--
2.46.0
- [PULL for-9.1 0/6] Miscellaneous fixes for QEMU 9.1-rc, Paolo Bonzini, 2024/08/13
- [PULL 1/6] target/hexagon: don't look for static glib, Paolo Bonzini, 2024/08/13
- [PULL 2/6] target/i386: Do not apply REX to MMX operands, Paolo Bonzini, 2024/08/13
- [PULL 3/6] target/i386: Use unit not type in decode_modrm, Paolo Bonzini, 2024/08/13
- [PULL 5/6] module: Prevent crash by resetting local_err in module_load_qom_all(),
Paolo Bonzini <=
- [PULL 6/6] po: update Italian translation, Paolo Bonzini, 2024/08/13
- [PULL 4/6] target/i386: Assert MMX and XMM registers in range, Paolo Bonzini, 2024/08/13
- Re: [PULL for-9.1 0/6] Miscellaneous fixes for QEMU 9.1-rc, Richard Henderson, 2024/08/13