Race condition when calling stop_waiter_thread()
authorHannes Reinecke <hare@suse.de>
Wed, 25 May 2011 12:40:19 +0000 (14:40 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 25 May 2011 18:27:17 +0000 (20:27 +0200)
commitc301a3f09203edf91df5a9adf4e32ea2a7238cda
treed6c804a5d7c5ca33f499848a98bdc1c2441c01af
parent5ed9b070d708f8f608ea3f402cc8264f33ef72eb
Race condition when calling stop_waiter_thread()

We cannot access the waiter structure from other threads as
the lifetime is totally different and it might be deleted
at any time.
So we better store the pthread id in the calling thread and
just send a signal to the thread.

References: bnc#642846

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/structs.h
libmultipath/waiter.c