Hi
On Sun, Sep 21, 2025 at 1:04 AM Mohamed Akram <[email protected]> wrote:
>
> The BQL is already locked by the main loop, so avoid locking again
> unless needed to not trigger an assertion failure.
>
> Signed-off-by: Mohamed Akram <[email protected]>
> ---
> ui/spice-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/spice-core.c b/ui/spice-core.c
> index 5992f9d..31c31f2 100644
> --- a/ui/spice-core.c
> +++ b/ui/spice-core.c
> @@ -222,7 +222,7 @@ static void channel_event(int event,
> SpiceChannelEventInfo *info)
> * thread and grab the BQL if so before calling qemu
> * functions.
> */
> - bool need_lock = !qemu_thread_is_self(&me);
> + bool need_lock = !bql_locked();
Looks good. Do you have a reproducer or a backtrace of the assertion
or is it theoretical?
> if (need_lock) {
> bql_lock();
> }
> --
> 2.51.0
>
>
--
Marc-André Lureau