[Qemu-devel] [RFC PATCH v2 20/26] replay: don't destroy mutex at exit

Pavel Dovgalyuk posted 26 patches 7 years, 11 months ago
There is a newer version of this series
[Qemu-devel] [RFC PATCH v2 20/26] replay: don't destroy mutex at exit
Posted by Pavel Dovgalyuk 7 years, 11 months ago
Replay mutex is held by vCPU thread and destroy function is called
from atexit of the main thread. Therefore we cannot destroy it safely.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>

---
 replay/replay.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/replay/replay.c b/replay/replay.c
index 6e34b79..be1d4a2 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -357,7 +357,6 @@ void replay_finish(void)
     replay_snapshot = NULL;
 
     replay_finish_events();
-    replay_mutex_destroy();
 }
 
 void replay_add_blocker(Error *reason)


Re: [Qemu-devel] [RFC PATCH v2 20/26] replay: don't destroy mutex at exit
Posted by Paolo Bonzini 7 years, 11 months ago
On 14/11/2017 09:18, Pavel Dovgalyuk wrote:
> Replay mutex is held by vCPU thread and destroy function is called
> from atexit of the main thread. Therefore we cannot destroy it safely.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> 
> ---
>  replay/replay.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/replay/replay.c b/replay/replay.c
> index 6e34b79..be1d4a2 100644
> --- a/replay/replay.c
> +++ b/replay/replay.c
> @@ -357,7 +357,6 @@ void replay_finish(void)
>      replay_snapshot = NULL;
>  
>      replay_finish_events();
> -    replay_mutex_destroy();
>  }
>  
>  void replay_add_blocker(Error *reason)
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>