Files
asterisk/main
Richard Mudgett a97d03e34a Deadlocks dealing with dialplan hints during reload.
There are two remaining different deadlocks reported dealing with dialplan
hints.

The deadlock in ASTERISK-17666 is caused by invalid locking order in
ast_remove_hint().  The hints container must be locked before the hint
object.

The deadlock in ASTERISK-17760 is caused by a catch-22 situation in
handle_statechange().  The deadlock is caused by not having the conlock
before calling the watcher callbacks.  Unfortunately, having that lock
causes a different deadlock as reported in ASTERISK-16961.

* Fixed ast_remove_hint() locking order.

* Made handle_statechange() no longer call the watcher callbacks holding
any locks that matter.

* Made hint ao2 destructor do the watcher callbacks for extension
deactivation to guarantee that they get called.

* Fixed hint reference leak in ast_add_hint() if the callback container
constructor failed.

* Fixed hint reference leak in complete_core_show_hint() for every hint it
found for CLI tab completion.

* Adjusted locking in ast_merge_contexts_and_delete() for safety.

* Added context_merge_lock to prevent ast_merge_contexts_and_delete() and
handle_statechange() from interfering with each other.

* Fixed ast_change_hint() not taking into account that the extension is
used for the hash key.

(closes issue ASTERISK-17666)
Reported by: irroot
Tested by: irroot
JIRA SWP-3318

(closes issue ASTERISK-17760)
Reported by: Byron Clark
Tested by: irroot
JIRA SWP-3393

Review: https://reviewboard.asterisk.org/r/1313/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22 15:44:58 +00:00
..
2010-12-20 09:14:29 +00:00
2011-06-01 23:11:55 +00:00
2007-12-11 22:20:22 +00:00
2011-06-10 15:29:00 +00:00
2010-07-14 15:48:36 +00:00
2010-06-17 17:23:43 +00:00
2008-07-21 21:00:47 +00:00
2009-03-18 02:28:55 +00:00
2011-04-20 05:25:15 +00:00
2007-11-21 00:23:49 +00:00
2010-05-18 22:48:51 +00:00
2010-04-22 18:07:02 +00:00