Re: [PATCH/RFC] mutex: Fix optimistic spinning vs. BKL

From: Benjamin Herrenschmidt
Date: Wed Apr 28 2010 - 00:46:26 EST


On Wed, 2010-04-28 at 14:38 +1000, Benjamin Herrenschmidt wrote:
> Currently, we can hit a nasty case with optimistic spinning on mutexes:
>
> CPU A tries to take a mutex, while holding the BKL
>
> CPU B tried to take the BLK while holding the mutex
>
> This looks like a AB-BA scenario but in practice, is allowed and happens
> due to the auto-release-on-schedule nature of the BKL.

.../...

BTW. The patch is only compile-tested so far :-) It's going to be
hammered with the test case that triggered the original bug hopefully
tonight.

Cheers,
Ben.


--
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/