lkml.org 
[lkml]   [2007]   [Jun]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 8 Jun 2007 09:20:50 +0200
FromIngo Molnar <>
SubjectRe: [patch 1/4] rt-mutex: Fix stale return value
* Thomas Gleixner <tglx@linutronix.de> wrote:

> -			if (unlikely(!waiter.task))
> +			if (unlikely(!waiter.task)) {
> +				/*
> +				 * Reset the return value. We might
> +				 * have returned with -EDEADLK and the
> +				 * owner released the lock while we
> +				 * were walking the pi chain.
> +				 */
> +				ret = 0;
>  				continue;
> -
> +			}

ok - i guess the reason here that we never triggered it in -rt is that 
-EDEADLK is a really rare case that only occurs with pi-futexes (and 
even then, only with buggy userspace or with intentional testcases). 
Plus, lockdep caught most/all of the in-kernel deadlocks before this 
mechanism could catch it.

Acked-by: Ingo Molnar <mingo@elte.hu>

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-08 07:35    [W:1.223 / U:0.640 seconds]
©2003-2008 Jasper Spaans