[OpenSIPS-Devel] [OpenSIPS/opensips] f4d5d3: load_balancer: Fix AB/BA deadlock in lb_start()
Liviu Chircu
noreply at github.com
Thu Sep 3 13:50:11 EST 2020
Branch: refs/heads/2.4
Home: https://github.com/OpenSIPS/opensips
Commit: f4d5d31e9217b6c270f693d847fd714f019f2bb1
https://github.com/OpenSIPS/opensips/commit/f4d5d31e9217b6c270f693d847fd714f019f2bb1
Author: Liviu Chircu <liviu at opensips.org>
Date: 2020-09-03 (Thu, 03 Sep 2020)
Changed paths:
M modules/load_balancer/lb_data.c
Log Message:
-----------
load_balancer: Fix AB/BA deadlock in lb_start()
Assuming we have resources A, B, before this patch we would have the
following lock grab order on the corresponding resource locks:
(see lb_data.c +743):
lb_start(): A, B
lb_next(): B, A
This patch fixes this type of deadlock by inverting the resource AVP
elements, such that both functions grab the array locks identically:
lb_start(): A, B
lb_next(): A, B
More information about the Devel
mailing list