On Friday 23 June 2006 18:03, Gavin Atkinson wrote: > On Fri, 2006-06-23 at 13:46 +0200, Martin Blapp wrote: > > Hi, > > > > Maybe this is the solution ? IMHO there is a race window > > open between the first tp->t_session test and the locking > > of the proc tree. > > I'm not sure if t_session is supposed to be protected by the proctree > lock though. With an initial glance of the code, it would seem odd to > be protected by the proctree lock, although I can't see any other locks > Someone with more knowledge of this code will probably know the answer > to this. > > There does seem to be a worrying comment above tty_close (which is the > only place that t_session seems to be set to NULL): > > * XXX our caller should have done `spltty(); l_close(); tty_close();' > * and l_close() should have flushed, but we repeat the spltty() and > * the flush in case there are buggy callers. > > As I understand it, spltty() is now a no-op. Does this mean that this > code is now essentially running without any locks that were used to > serialise changes to struct tty in days gone by? Or is the whole tty > subsystem still running under Giant?
Just as a random note. I remember looking at a somewhat similar problem during the 6.0 release cycle and comming up with a patch[1]. Somehow the problem went away and I lost track of the patch. Can't remember who was testing it. I think I talked with Christan about it, though [CC-list++] Note, I am not sure if the patch still applies or is correct at all, but from looking at it (and the name of the file) I seem to remember that there was a problem with t_pgrp and t_session being accessed unlocked in some places. Maybe it helps, maybe it doesn't. [1] http://people.freebsd.org/~mlaier/tty.t_pgrp.diff -- /"\ Best regards, | [EMAIL PROTECTED] \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | [EMAIL PROTECTED] / \ ASCII Ribbon Campaign | Against HTML Mail and News
pgp4lER89nlY7.pgp
Description: PGP signature
