diff options
author | Venky Shankar <vshankar@redhat.com> | 2015-06-02 21:49:13 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2015-06-04 03:40:49 -0700 |
commit | b27ab7737f76d2a65e790afe3872f16dc3e7e078 (patch) | |
tree | 3c54d09fa783f8df8aae7d681276a99bdc04a262 /contrib/timer-wheel | |
parent | c18be39b6c37cad93f1c00507ae76d1fd4d3571a (diff) |
contrib/timer-wheel: fix deadlock in del_timer()
Backport of http://review.gluster.org/11050
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 <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/11056
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'contrib/timer-wheel')
-rw-r--r-- | contrib/timer-wheel/timer-wheel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/timer-wheel/timer-wheel.c b/contrib/timer-wheel/timer-wheel.c index df8bb31fe87..d9b2ccdc68a 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, |