From 8566d898b5249df22f06d8954f5633a28c9b8e5e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 2 Jun 2016 19:33:39 +0200 Subject: fix possible deadlock replacing processor state. --- libs/ardour/route.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/ardour/route.cc') diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 5f98fba1fe..5a0959f8bb 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2826,9 +2826,14 @@ Route::set_processor_state (const XMLNode& node) } { - Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); Glib::Threads::RWLock::WriterLock lm (_processor_lock); + /* re-assign _processors w/o process-lock. + * if there's an IO-processor present in _processors but + * not in new_order, it will be deleted and ~IO takes + * a process lock. + */ _processors = new_order; + Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); if (must_configure) { configure_processors_unlocked (0, &lm); -- cgit v1.2.3