[asterisk-dev] [Code Review] Give zombies a safe channel driver to use.

David Vossel reviewboard at asterisk.org
Fri May 20 12:38:47 CDT 2011


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



/branches/1.8/main/channel.c
<https://reviewboard.asterisk.org/r/1224/#comment7253>

    This all makes perfect sense to me. We are essentially disconnecting the tech_pvt before calling hangup on the channel.  Once the tech_pvt is told to disconnect we should never call back into that technology, but we can not guarantee this will not happen because the channel hasn't actually been hung up. This is why we have all those checks to the AST_FLAG_ZOMBIE before calling a channel tech's function.
    
    This can be thought of as a catch all for all the times we would have to check the AST_FLAG_ZOMBIE flag.


- David


On 2011-05-20 12:22:12, rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1224/
> -----------------------------------------------------------
> 
> (Updated 2011-05-20 12:22:12)
> 
> 
> Review request for Asterisk Developers, Russell Bryant and David Vossel.
> 
> 
> Summary
> -------
> 
> Recent crashes from zombie channels suggests that they need a safe home to goto.
> 
> When a masquerade happens, the physical part of the zombie channel is hungup.  The hangup normally sets the channel private pointer to NULL.  If someone then blindly does a callback to the channel driver, a crash is likely because the private pointer is NULL.
> 
> The masquerade now sets the channel technology of zombie channels to the NULL channel driver.
> 
> 
> This addresses bugs 19116 and 19310.
>     https://issues.asterisk.org/view.php?id=19116
>     https://issues.asterisk.org/view.php?id=19310
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/include/asterisk/channel.h 320060 
>   /branches/1.8/main/channel.c 320060 
>   /branches/1.8/main/features.c 320060 
> 
> Diff: https://reviewboard.asterisk.org/r/1224/diff
> 
> 
> Testing
> -------
> 
> Tested a version of this patch without the zombie check committed for issue 19116.  The crash was avoided.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110520/8c5bca5b/attachment-0001.htm>


More information about the asterisk-dev mailing list