[Asterisk-code-review] sig_pri: Fix deadlock caused by sig_pri_queue_hangup (asterisk[16])
George Joseph
asteriskteam at digium.com
Tue Jan 7 07:19:16 CST 2020
Hello Joshua Colp, Friendly Automation,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/c/asterisk/+/13527
to look at the new patch set (#2).
Change subject: sig_pri: Fix deadlock caused by sig_pri_queue_hangup
......................................................................
sig_pri: Fix deadlock caused by sig_pri_queue_hangup
The change to add setting hangupsource to sig_pri_queue_hangup()
made in https://gerrit.asterisk.org/c/asterisk/+/12857 casued
deadlocks when a hangup request was received from the core at the
same time a hanguprequest was received from the remote end via the
D channel.
Although the PRI's channel private structure was being unlocked
before setting the hangupsource, the PRI's own lock was still being
held during the process. If channel actions were also coming from
the core, a deadlock on the PRI could result. This deadlock could
then escalate to the entire DAHDI subsystem via DAHDI's global
interface list lock, especially if someone used the PRI CLI commands.
Fix:
* We now unlock the PRI as well as the PRI's channel private
structure before setting the hangupsource, then relock both
afterwards.
ASTERISK-28605
Reported by: Dirk Wendland
Change-Id: Id74aaa5d4e3746063dbe9deed188eb65193cb9c9
---
M channels/sig_pri.c
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/13527/2
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13527
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id74aaa5d4e3746063dbe9deed188eb65193cb9c9
Gerrit-Change-Number: 13527
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200107/8624eb10/attachment.html>
More information about the asterisk-code-review
mailing list