Re: [patch 1/4] rt-mutex: Fix stale return value

From: Ingo Molnar
Date: Fri Jun 08 2007 - 03:32:45 EST



* Thomas Gleixner <tglx@xxxxxxxxxxxxx> 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@xxxxxxx>

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