[mythtv-commits] Ticket #9959: [PATCH] ringbuffer: Fix a deadlock in readahead

MythTV noreply at mythtv.org
Mon Aug 1 09:31:25 UTC 2011


#9959: [PATCH] ringbuffer: Fix a deadlock in readahead
-------------------------------------------------+-------------------------
 Reporter:  Lawrence Rust <lvr@…>                |           Type:  Patch -
   Status:  new                                  |  Bug Fix
Milestone:  unknown                              |       Priority:  minor
  Version:  Trunk Head                           |      Component:  MythTV
 Keywords:  ringbuffer deadlock                  |  - General
                                                 |       Severity:  medium
                                                 |  Ticket locked:  0
-------------------------------------------------+-------------------------
 There is a potential deadlock in ringbuffer::run() due to violation of the
 lock acquisition hierarchy when it calls safe_read().

 If an error is encountered in fileringbuffer::safe_read() then poslock is
 read locked prior to calling Seek() but run() has already read locked
 rbwlock which leads to a violation of the lock hierarchy
 rwlock->poslock->rbrlock->rbwlock.

 This fix releases rbwlock prior to calling safe_read.

 NB this bug also affects fixes/0.24

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9959>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list