~andreas-pokorny/mir/server_module_type_detection

Viewing all changes in revision 2335.

  • Committer: Tarmac
  • Author(s): Alberto Aguirre
  • Date: 2015-02-23 11:36:36 UTC
  • mfrom: (2323.3.9 fix-1421255)
  • Revision ID: tarmac-20150223113636-nx30z7716o43xyo6
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. Fixes: https://bugs.launchpad.net/bugs/1421255.

Approved by Kevin DuBois, PS Jenkins bot, Alan Griffiths.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: