path: root/contrib
diff options
authorVenky Shankar <>2015-06-02 21:49:13 +0530
committerVenky Shankar <>2015-06-04 03:40:49 -0700
commitb27ab7737f76d2a65e790afe3872f16dc3e7e078 (patch)
tree3c54d09fa783f8df8aae7d681276a99bdc04a262 /contrib
parentc18be39b6c37cad93f1c00507ae76d1fd4d3571a (diff)
contrib/timer-wheel: fix deadlock in del_timer()
Backport of commit eaf3bfa added mod_timers() and successfully screwed up del_timer() by incorrectly wrapping it within double lock blocks. del_timer() was included before the above commit for the sake of timer API completion, thankfully noone used it till now. Change-Id: I07a454a216cf09dbb84777a23630e74a1e7f2830 BUG: 1227611 Signed-off-by: Venky Shankar <> Reviewed-on: Tested-by: NetBSD Build System <> Tested-by: Gluster Build System <> Reviewed-by: Raghavendra Bhat <>
Diffstat (limited to 'contrib')
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/timer-wheel/timer-wheel.c b/contrib/timer-wheel/timer-wheel.c
index df8bb31..d9b2ccd 100644
--- a/contrib/timer-wheel/timer-wheel.c
+++ b/contrib/timer-wheel/timer-wheel.c
@@ -225,7 +225,7 @@ void gf_tw_del_timer (struct tvec_base *base, struct gf_tw_timer_list *timer)
if (timer_pending (timer))
__gf_tw_detach_timer (timer);
- pthread_spin_lock (&base->lock);
+ pthread_spin_unlock (&base->lock);
int gf_tw_mod_timer_pending (struct tvec_base *base,