~albaguirre/mir/backport-fixes-to-0.11

Viewing all changes in revision 2291.

  • Committer: Alberto Aguirre
  • Date: 2015-02-23 20:00:14 UTC
  • Revision ID: alberto.aguirre@canonical.com-20150223200014-jj4mpgh1f5d3qxyb
Fix deadlock caused by lock ordering issues.

The framedropping policy acquires an internal lock while invoking the user callback. BufferQueue calls framedrop policy methods while holding its own lock; the callback implementation given to the policy also acquires the same lock which results in a classic lock ordering deadlock issue.

To avoid such lock order issues, the framedrop policy and alarm factory interfaces expose an additional API to allow users to pass in lock/unlock functions, which can then be used by the callback dispatching context to preserve lock ordering.

Backported from lp:mir r2335

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: