From: David Howells on
Michel Lespinasse <walken(a)> wrote:

> If there are no active threasd using a semaphore, it is always correct to
> unqueue blocked threads. This seems to be what was intended in the undo code.
> What was done instead, was to look for a sem count of zero - this is an
> impossible situation, given that at least one thread is known to be queued
> on the semaphore. The code might be correct as written, but it's hard to
> reason about and it's not what was intended (otherwise the goto out would
> have been unconditional).
> Go for checking the active count - the alternative is not worth the headache.

I think this is a definite bug fix, so I've sent it upstream in advance.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at