[asterisk-dev] [Code Review] 2624: app_mixmonitor: Fix crashes caused by unloading app_mixmonitor while a MixMonitor is running on a channel

svnbot reviewboard at asterisk.org
Fri Jun 14 11:14:55 CDT 2013


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

(Updated June 14, 2013, 11:14 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers, Joshua Colp, Matt Jordan, and Mark Michelson.


Changes
-------

Committed in revision 391778


Repository: Asterisk


Description
-------

Unloading app_mixmonitor will cause a crash if a mixmonitor is running when you unload the module. I'm pretty sure this is because the mixmonitor thread's function is unloaded while it is running and this leads to a segfault.

Actually running the application or manager action should be fine I think since refcounts are bumped by core code that starts those functions. It's just what is going on between then and actually ending the mixmonitor that causes problems.

This patch fixes that by bumping the refcount for the module before executing the thread and releasing that reference upon exiting the thread (or if the thread fails to start, immediately after failure to start the thread).


Diffs
-----

  /branches/1.8/apps/app_mixmonitor.c 391772 

Diff: https://reviewboard.asterisk.org/r/2624/diff/


Testing
-------

Performed unloads against app_mixmonitor while a mixmonitor was running.  They were appropriately rejected.


Thanks,

jrose

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


More information about the asterisk-dev mailing list