qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bdrv_drained_begin deadlock with io-threads


From: Dietmar Maurer
Subject: Re: bdrv_drained_begin deadlock with io-threads
Date: Tue, 31 Mar 2020 11:17:47 +0200 (CEST)

Inside exec.c, there is a race:

-------
static bool prepare_mmio_access(MemoryRegion *mr)
{
    bool unlocked = !qemu_mutex_iothread_locked();
    bool release_lock = false;

    if (unlocked && mr->global_locking) {
        qemu_mutex_lock_iothread();
------

IMHO, checking for unlocked that way is wrong. Should use some kind
of _trylock instead?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]