Author: rmudgett Date: Tue Oct 28 16:26:20 2014 New Revision: 426552 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426552 Log: bridge_builtin_features: Add missing channel locks around ast_get_chan_features_general_config().
The feature_automonitor() and feature_automixmonitor() functions were not locking the channel around ast_get_chan_features_general_config(). Accessing the channel datastore list without the channel locked is a good way to corrupt the list or follow the pointer chain into oblivion. ........ Merged revisions 426531 from http://svn.asterisk.org/svn/asterisk/branches/12 Modified: branches/13/ (props changed) branches/13/bridges/bridge_builtin_features.c Propchange: branches/13/ ------------------------------------------------------------------------------ Binary property 'branch-12-merged' - no diff available. Modified: branches/13/bridges/bridge_builtin_features.c URL: http://svnview.digium.com/svn/asterisk/branches/13/bridges/bridge_builtin_features.c?view=diff&rev=426552&r1=426551&r2=426552 ============================================================================== --- branches/13/bridges/bridge_builtin_features.c (original) +++ branches/13/bridges/bridge_builtin_features.c Tue Oct 28 16:26:20 2014 @@ -226,7 +226,9 @@ RAII_VAR(struct ast_channel *, peer_chan, NULL, ast_channel_cleanup); RAII_VAR(struct ast_features_general_config *, features_cfg, NULL, ao2_cleanup); + ast_channel_lock(bridge_channel->chan); features_cfg = ast_get_chan_features_general_config(bridge_channel->chan); + ast_channel_unlock(bridge_channel->chan); ast_bridge_channel_lock_bridge(bridge_channel); peer_chan = ast_bridge_peer_nolock(bridge_channel->bridge, bridge_channel->chan); ast_bridge_unlock(bridge_channel->bridge); @@ -412,7 +414,9 @@ RAII_VAR(struct ast_channel *, peer_chan, NULL, ast_channel_cleanup); RAII_VAR(struct ast_features_general_config *, features_cfg, NULL, ao2_cleanup); + ast_channel_lock(bridge_channel->chan); features_cfg = ast_get_chan_features_general_config(bridge_channel->chan); + ast_channel_unlock(bridge_channel->chan); ast_bridge_channel_lock_bridge(bridge_channel); peer_chan = ast_bridge_peer_nolock(bridge_channel->bridge, bridge_channel->chan); ast_bridge_unlock(bridge_channel->bridge); -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
