]> git.ipfire.org Git - thirdparty/asterisk.git/commit
features: Fix channel datastore access. 24/3124/1
authorRichard Mudgett <rmudgett@digium.com>
Thu, 30 Jun 2016 20:17:02 +0000 (15:17 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 30 Jun 2016 20:31:20 +0000 (15:31 -0500)
commit640fbbbe2868779545aa8aef6b3f3fefdeb4eef5
tree061c0dea88e873aded5f4fde333f9cead6b2a6f4
parent77c49ac1a142b1665a986ed7354eb33c2279851b
features: Fix channel datastore access.

Found as a result of the testsuite tests/callparking test crashing.

Several calls to ast_get_chan_featuremap_config() and
ast_get_chan_features_xfer_config() did not lock the channel before
calling so the channel's datastore list was accessed without the lock's
protection.  Apparently another thread deleted a datastore on the
channel's list while the crashing thread was walking the list.  Crash at
0xdeaddead due to MALLOC_DEBUG's memory filler value as a result.

* Add missing channel locks to calls that were not already protected
as the doxygen for those calls indicates.

Change-Id: Id273b3d305cc616406c353cbc841b2b7655efaa1
main/bridge_channel.c
main/features.c