diff mbox series

[1/2] plugins/loader: fix deadlock when resetting/uninstalling a plugin

Message ID 20250404032027.430575-2-pierrick.bouvier@linaro.org
State New
Headers show
Series fix deadlock with plugins reset/uninstall | expand

Commit Message

Pierrick Bouvier April 4, 2025, 3:20 a.m. UTC
Reported and fixed by Dmitry Kurakin.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2901
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 plugins/loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé April 4, 2025, 1:02 p.m. UTC | #1
On 4/4/25 05:20, Pierrick Bouvier wrote:
> Reported and fixed by Dmitry Kurakin.
> 

Fixes: 54cb65d8588 ("plugin: add core code")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2901
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2901
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   plugins/loader.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/plugins/loader.c b/plugins/loader.c
index 7523d554f03..0d6e082e170 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -370,7 +370,7 @@  static void plugin_reset_destroy(struct qemu_plugin_reset_data *data)
 {
     qemu_rec_mutex_lock(&plugin.lock);
     plugin_reset_destroy__locked(data);
-    qemu_rec_mutex_lock(&plugin.lock);
+    qemu_rec_mutex_unlock(&plugin.lock);
 }
 
 static void plugin_flush_destroy(CPUState *cpu, run_on_cpu_data arg)