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

MythTV noreply at mythtv.org
Mon Aug 1 17:47:05 UTC 2011


#9959: [PATCH] ringbuffer: Fix a deadlock in readahead
-------------------------------------------------+-------------------------
 Reporter:  Lawrence Rust <lvr@…>                |          Owner:  danielk
     Type:  Patch - Bug Fix                      |         Status:
 Priority:  minor                                |  accepted
Component:  MythTV - General                     |      Milestone:  unknown
 Severity:  medium                               |        Version:  Trunk
 Keywords:  ringbuffer deadlock                  |  Head
                                                 |     Resolution:
                                                 |  Ticket locked:  0
-------------------------------------------------+-------------------------

Comment (by Lawrence Rust <lvr@…>):

 OK, I see what you're trying to do - it adds a level of security in case
 something changes rbwpos while rbwlock is released.  However, I think that
 you're worrying unnecessarily.  The only code that changes rbwpos is
 ResetReadAhead (protected) and this is only called from Seek() (public)
 which obtains a rwlock write lock at entry, or the caller of Seek has done
 so.  Any attempt to write lock rwlock will block until readahead is idle.

 What you propose is absolutely safe and protects against future changes.
 I think the change is for the best.

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


More information about the mythtv-commits mailing list