So looking a bit more at your trivial fixups, I'd suggest strongly that
they be re-organized a bit.
I cherry-picked your tty layer thing, because it was a real fix.
On Wed, 14 May 2008, Ingo Molnar wrote:
The above doesn't even work in general. It depends on having just a single
level of locking, and is ugly to boot. So wow about we just expose some
version of
depth = release_kernel_lock()
..
reacquire_kernel_lock(depth);
to existing BKL users as a way to safely release and re-aquire it
regardless of depth. That makes the code more generic, but it *also* makes
it more readable than that "if (bkl) [un]lock_kernel()" sequence.
I think this one should be changed - that comment says "do not take", but
in fact you still do take it, you just release it earlier. So we should
just not start out with the kernel locked in the first place. The BKL
doesn't do anything for the init sequence anyway, since all of this is for
code that runs before there even are any other threads (not counting the
idle thread).
I don't see anything in there that could *possibly* depend on the kernel
lock, and if there is anything, it would need to be fixed anyway.
ACK. Code that relies on this is broken anyway.
We used to have lots of "proc_create()" followed by setup code that could
race with "proc_lookup()", but they were fundamentally racy anyway, so
this should happen regardless of any other BKL removal.
See the above comment about "release/reaquire_kernel_lock()".
Same thing.
Same thing.
Same thing.
And obviously this one I'd never take. It would need to work with a
working BKL implementation.
Linus
--