Project

General

Profile

Actions

Feature #4485

open

154: incorrect usage of wwmutex interface

Added by Alexey Khoroshilov about 11 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
09/21/2013
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

Wait/Wound Deadlock-Proof Mutex Design is presented here:
http://lwn.net/Articles/548921/

Typical incorrect usages of the interface includes:
  1. Forgetting to call ww_acquire_fini or ww_acquire_init.
  2. Attempting to lock more mutexes after ww_acquire_done.
  3. Attempting to lock more mutexes after -EDEADLK, before calling ww_mutex_lock_slow.
  4. Calling ww_mutex_lock_slow with while still holding some mutexes.
  5. Calling ww_mutex_lock_slow on the wrong mutex, or before -EDEADLK was returned.
  6. Unlocking mutexes with the wrong unlock function.
  7. Calling one of the ww_acquire_* twice on the same context.
  8. Using a different ww_class for the mutex than for the ww_acquire_ctx.
  9. Calling ww_acquire_init to initialize a second ww_acquire_ctx before having called ww_acquire_fini on the first.
  10. Mixing ww_mutex_lock and ww_mutex_lock_single.
Actions

Also available in: Atom PDF