Re: Question on mutex code

From: Davidlohr Bueso
Date: Sat Mar 14 2015 - 21:09:27 EST


On Sat, 2015-03-14 at 18:03 -0700, Davidlohr Bueso wrote:
> Good analysis, but not quite accurate for one simple fact: mutex
> trylocks _only_ use fastpaths (obviously just depend on the counter
> cmpxchg to 0), so you never fallback to the slowpath you are mentioning,
> thus the race is non existent. Please see the arch code.

For debug we use the trylock slowpath, but so does everything else, so
again you cannot hit this scenario.

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