]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Merged revisions 260346 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Fri, 30 Apr 2010 20:18:31 +0000 (20:18 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 30 Apr 2010 20:18:31 +0000 (20:18 +0000)
commitdc515bc8aca4aeeefea440fc98b60f10608b34d7
treec80ab91b27480ead11836d1d0bba3c9366e62de9
parent7f0a35d123bc0190d4e4ea40cd544342fc35c105
Merged revisions 260346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r260346 | mmichelson | 2010-04-30 15:11:02 -0500 (Fri, 30 Apr 2010) | 24 lines

  Merged revisions 260345 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r260345 | mmichelson | 2010-04-30 15:08:15 -0500 (Fri, 30 Apr 2010) | 18 lines

    Fix potential crash from race condition due to accessing channel data without the channel locked.

    In res_musiconhold.c, there are several places where a channel's
    stream's existence is checked prior to calling ast_closestream on it. The issue
    here is that in several cases, the channel was not locked while checking the
    stream. The result was that if two threads checked the state of the channel's
    stream at approximately the same time, then there could be a situation where
    both threads attempt to call ast_closestream on the channel's stream. The result
    here is that the refcount for the stream would go below 0, resulting in a crash.

    I have added proper channel locking to res_musiconhold.c to ensure that
    we do not try to check chan->stream without the channel locked. A Digium customer
    has been using this patch for several weeks and has not had any crashes since
    applying the patch.

    ABE-2147
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@260354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_musiconhold.c