[OpenSIPS-Devel] [OpenSIPS/opensips] 000c65: load_balancer: Fix AB/BA deadlock in lb_start()
Liviu Chircu
noreply at github.com
Fri Sep 4 12:29:11 EST 2020
Branch: refs/heads/3.0
Home: https://github.com/OpenSIPS/opensips
Commit: 000c6507e3912863ed16d46d3cabed9f5721da7c
https://github.com/OpenSIPS/opensips/commit/000c6507e3912863ed16d46d3cabed9f5721da7c
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
(cherry picked from commit f4d5d31e9217b6c270f693d847fd714f019f2bb1)
More information about the Devel
mailing list