[asterisk-commits] dvossel: branch 1.6.1 r246548 - in /branches/1.6.1: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 12 17:34:14 CST 2010
Author: dvossel
Date: Fri Feb 12 17:34:10 2010
New Revision: 246548
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=246548
Log:
Merged revisions 246546 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r246546 | dvossel | 2010-02-12 17:32:33 -0600 (Fri, 12 Feb 2010) | 21 lines
Merged revisions 246545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r246545 | dvossel | 2010-02-12 17:30:17 -0600 (Fri, 12 Feb 2010) | 16 lines
lock channel during datastore removal
On channel destruction the channel's datastores are removed and
destroyed. Since there are public API calls to find and remove
datastores on a channel, a lock should be held whenever datastores are
removed and destroyed. This resolves a crash caused by a race
condition in app_chanspy.c.
(closes issue #16678)
Reported by: tim_ringenbach
Patches:
datastore_destroy_race.diff uploaded by tim ringenbach (license 540)
Tested by: dvossel
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/channel.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=246548&r1=246547&r2=246548
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Fri Feb 12 17:34:10 2010
@@ -1389,9 +1389,11 @@
}
/* Get rid of each of the data stores on the channel */
+ ast_channel_lock(chan);
while ((datastore = AST_LIST_REMOVE_HEAD(&chan->datastores, entry)))
/* Free the data store */
ast_datastore_free(datastore);
+ ast_channel_unlock(chan);
/* Lock and unlock the channel just to be sure nobody has it locked still
due to a reference that was stored in a datastore. (i.e. app_chanspy) */
More information about the asterisk-commits
mailing list