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. >
- [PATCH v5 00/20] job: replace AioContext lock w... Emanuele Giuseppe Esposito
- [PATCH v5 07/20] job.h: add _locked duplic... Emanuele Giuseppe Esposito
- Re: [PATCH v5 07/20] job.h: add _locke... Stefan Hajnoczi
- Re: [PATCH v5 07/20] job.h: add _l... Emanuele Giuseppe Esposito
- [PATCH v5 08/20] jobs: protect jobs with j... Emanuele Giuseppe Esposito
- Re: [PATCH v5 08/20] jobs: protect job... Stefan Hajnoczi
- Re: [PATCH v5 08/20] jobs: protect... Emanuele Giuseppe Esposito
- Re: [PATCH v5 08/20] jobs: pro... Stefan Hajnoczi
- Re: [PATCH v5 08/20] jobs... Emanuele Giuseppe Esposito
- [PATCH v5 19/20] job.c: enable job lock/un... Emanuele Giuseppe Esposito
- Re: [PATCH v5 19/20] job.c: enable job... Stefan Hajnoczi
- Re: [PATCH v5 19/20] job.c: enable... Emanuele Giuseppe Esposito
- [PATCH v5 13/20] job.h: rename job API fun... Emanuele Giuseppe Esposito
- [PATCH v5 06/20] jobs: remove aiocontext l... Emanuele Giuseppe Esposito