qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions


From: Emanuele Giuseppe Esposito
Subject: Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex
Date: Thu, 24 Feb 2022 10:52:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0


On 17/02/2022 15:20, Stefan Hajnoczi wrote:
> On Tue, Feb 08, 2022 at 09:35:00AM -0500, Emanuele Giuseppe Esposito wrote:
>>  static void job_exit(void *opaque)
>>  {
>>      Job *job = (Job *)opaque;
>>      AioContext *ctx;
>> +    JOB_LOCK_GUARD();
>>  
>>      job_ref(job);
>>      aio_context_acquire(job->aio_context);
> 
> The previous patch said:
> 
>   We don't want this, as job_lock must be taken inside the AioContext
>   lock, and taking it outside would cause deadlocks.

This was misleading (and thus removed). You have to remember that at
this point JOB_LOCK_GUARD is nop.
I will add this to the commit message too.

> 
> Therefore this looks like a deadlock.
> 




reply via email to

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