Resolve a deadlock between the timer and serialize locks.
This patch resolves a deadlock between the serialize lock (in
exec/main.c) and the timer lock (in exec/timer.c). I observed this
deadlock happening fairly quickly on a cluster using the EVT service
from OpenAIS. (OpenAIS 1.1.4, Corosync 1.4.1)
In prioritized_timer_thread(), it was grabbing:
1) timer lock
2) serialize lock
In another thread, you have:
1) grab the serialize lock in deliver_fn() of exec/main.c
2) grab the timer lock in corosync_timer_add_duration().
The patch just swaps the locking order in the timer thread.
Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>