[asterisk-dev] [Code Review] chan_sip directed pickup deadlock

Russell Bryant reviewboard at asterisk.org
Fri May 13 16:46:32 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1175/#review3548
-----------------------------------------------------------

Ship it!



/branches/1.8/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1175/#comment7229>

    Instead of locking the channel back here, you could just always set *nounlock = 1 up above the if (sip_pickup()) part.
    
    Otherwise, the added refcount part looks good.


- Russell


On 2011-05-13 16:37:18, Brett Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1175/
> -----------------------------------------------------------
> 
> (Updated 2011-05-13 16:37:18)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch fixes a deadlock which would cause ast_do_masquerade to request a channel lock while already holding a sip_pvt structure, violating locking order and causing deadlocks each time a directed pickup was finished locking up asterisk entirely holding the channels lock.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/channels/chan_sip.c 318917 
> 
> Diff: https://reviewboard.asterisk.org/r/1175/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Brett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110513/b77bd45b/attachment.htm>


More information about the asterisk-dev mailing list