lkml.org 
[lkml]   [2006]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.17-rc5-mm3: bad unlock ordering (reiser4?)

* Valdis.Kletnieks@vt.edu <Valdis.Kletnieks@vt.edu> wrote:

> On Sun, 04 Jun 2006 13:33:26 PDT, Andrew Morton said:
>
> > Why does the locking validator complain about unlocking ordering?
>
> Presumably, if the lock nesting *should* be "take A, take B, release
> B, release A", if it sees "Take A, Take B, release A" it means there's
> potentially a missing 'release B' that got forgotten (most likely an
> error case that does a 'return;' instead of a 'goto
> end_of_function_cleanup' like we usually code.
>
> Having said that, I'm not sure it qualifies as a "BUG". Certainly
> would qualify for a "SMELLS_FISHY" though. But we don't have one of
> those handy, so maybe BUG is as good as it gets (given that the person
> who built the kernel *asked* to be nagged about locking funkyness)....

yes. This warning caught a couple of bugs, and documented a couple of
'fishy' places. Sometimes it's code that is totally correct. I think
it's worth the extra iteration, there arent that many non-nested
unlocking places.

straight nested unlocking is also best for performance and scalability:
the outmost lock should be released last, because that's what the
waiters are most likely to be blocking/spinning upon.

nevertheless i'll turn that warning into a less scary message.

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

\
 
 \ /
  Last update: 2006-06-04 23:37    [W:0.067 / U:3.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site