2002-07-08 18:58:26

by Paul Menage

[permalink] [raw]
Subject: Re: BKL removal

In article <[email protected]>,
you write:
>The BKL, unless used unbalanced, can never cause a bug.
>It could be insufficient or superfluous, but never be really buggy in
>itself.

Unless you're including incorrect nesting in your definition of
"unbalanced", that's not really true. E.g. lock_kernel() anywhere that
dcache_lock is held can deadlock against anywhere that does a path
lookup with the BKL held (such as do_coredump()).

Paul


2002-07-08 21:40:48

by Oliver Neukum

[permalink] [raw]
Subject: Re: BKL removal

Am Montag, 8. Juli 2002 21:00 schrieb [email protected]:
> In article <[email protected]>,
>
> you write:
> >The BKL, unless used unbalanced, can never cause a bug.
> >It could be insufficient or superfluous, but never be really buggy in
> >itself.
>
> Unless you're including incorrect nesting in your definition of
> "unbalanced", that's not really true. E.g. lock_kernel() anywhere that
> dcache_lock is held can deadlock against anywhere that does a path
> lookup with the BKL held (such as do_coredump()).

Yes, for the record. If you mix locking orders you can deadlock, as with any
other lock. And the BKL needs process context. And it doesn't help
against races with interrupts.

Regards
Oliver