On Mon, Jan 13, 2003 at 08:25:39AM +0100, Andi Kleen wrote:
> > Oh, yes, I have spent hours and hours trying to untangle tty locking
> > and it isn't simple.
>
> Oops. Could you quickly summarize your findings so far ?
I only found more confusions - I can't figure how tty_files list
is locked - sure files_lock is supposed to protect it but there
are deletions done without any lock. Another thing that needs
looking into is to avoid or reduce use of the tasklist_lock there.
> > What does that BKL protect ? I can't seem to ever figure our if
> > all the races are plugged or not.
>
> Well, one has to start somewhere. Just starting by plugging most of the
> obvious races, then the more subtle ones can be attacked later.
>
> The idea of the BKL was to protect the protect context code against
> itself (code lock) and also the few global data structures that
> are only accessed from process context (like the tty drivers list)
In that case would it not be better to replace all BKLs by a single tty
lock ?
>
> I attached my current patch, it isn't too well tested however and needs
> more work.
>
> Mostly just adds lock_kernel()s to the high level code so far and a few comments.
Cool, I will start off by testing this stuff.
Thanks
Dipankar
-
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/
This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:44 EST