22 Jun, 2014

1 commit

  • The conditions under which deadlock detection is conducted are unclear
    and undocumented.

    Add constants instead of using 0/1 and provide a selection function
    which hides the additional debug dependency from the calling code.

    Add comments where needed.

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Reviewed-by: Steven Rostedt
    Cc: Lai Jiangshan
    Link: http://lkml.kernel.org/r/20140522031949.947264874@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

07 Jun, 2014

1 commit

  • Even in the case when deadlock detection is not requested by the
    caller, we can detect deadlocks. Right now the code stops the lock
    chain walk and keeps the waiter enqueued, even on itself. Silly not to
    yell when such a scenario is detected and to keep the waiter enqueued.

    Return -EDEADLK unconditionally and handle it at the call sites.

    The futex calls return -EDEADLK. The non futex ones dequeue the
    waiter, throw a warning and put the task into a schedule loop.

    Tagged for stable as it makes the code more robust.

    Signed-off-by: Thomas Gleixner
    Cc: Steven Rostedt
    Cc: Peter Zijlstra
    Cc: Brad Mouring
    Link: http://lkml.kernel.org/r/20140605152801.836501969@linutronix.de
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

06 Nov, 2013

1 commit