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

Re: [lvm-devel] [PATCH] (DRAFT!) Fix a deadlock in CLVMD (possibly related to BZ 561226).



Milan Broz <mbroz redhat com> writes:

> p.s.
> nitpicking
>
> 	DEBUGLOG("in sub thread: client = %p\n", client);
> 	+ pthread_mutex_lock(&client->bits.localsock.mutex);
>
> 	/* Don't start until the LVM thread is ready */
> 	pthread_mutex_lock(&lvm_start_mutex);
> 	pthread_mutex_unlock(&lvm_start_mutex);
> 	DEBUGLOG("Sub thread ready for work.\n");
>
>
> Can we move that localsock.muext lock after the lvm_start_mutex exercise?
> (Which I do not like either - isn't cond wait better for that?)

I would be actually wary about that -- I suspect that going the other
way around could introduce a (very slight) race condition. Not that it
would ever happen in practice, but still. On the other hand, I didn't
try too hard to think about it, so I might be wrong.

Yours,
   Petr.


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