Opened 10 years ago

Closed 10 years ago

#6405 closed patch (fixed)

PATCH: Mutex locking bug in dvbstreamhandler.cpp

Reported by: tomimo@… Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The patch below fixes an obvious potential deadlock (happened here once already).

Index: libs/libmythtv/dvbstreamhandler.cpp
===================================================================
--- libs/libmythtv/dvbstreamhandler.cpp	(revision 20282)
+++ libs/libmythtv/dvbstreamhandler.cpp	(working copy)
@@ -200,9 +200,9 @@ void DVBStreamHandler::Start(void)
             return;
         }
 
+        is_running_lock.lock();
         while (!IsRunning())
         {
-            is_running_lock.lock();
             _running_state_changed.wait(&is_running_lock, 100);
         }
     }

Regards, Tomi Orava

Change History (1)

comment:1 Changed 10 years ago by Janne Grunau

Resolution: fixed
Status: newclosed

(In [20285]) fix deadlock in DVBStreamHandler::Start, Closes #6405

patch by: Tomi Orava <tomimo >>at<< ncircle <dot> nullnet >dot< fi>

Note: See TracTickets for help on using tickets.