Cc: Steven Rostedt <rostedt@...>, Linus Torvalds <torvalds@...>, Jeremy Fitzhardinge <jeremy@...>, Peter Zijlstra <a.p.zijlstra@...>, David Miller <davem@...>, <hugh@...>, <mingo@...>, <akpm@...>, <linux-kernel@...>, <davej@...>
I actually did come across one bug in my lifetime where the out of
nesting order
of unlocks caused a bug. IIRC, it had to do (as Linus mentioned) with
lots of
little functions that required locking. One of these functions was
between the
out of order unlocking and was taking another inner lock.
I don't remember the exact details, but it was something that made me
try to nest
locks and unlocks nicely when possible. And as Linus pointed out, there
are several
cases where it just doesn't make sense to nest.
-- Steve
--