Messages in this thread | | | Date | Sun, 3 Jun 2012 14:06:04 +0100 | From | Alan Cox <> | Subject | Re: [PATCH] tty: add lockdep annotations |
| |
> Actually, I think we could probably make it really trivial by forcing > the free'ing of the tty itself to be RCU-delayed.
It doesn't solve the problem of the synchronization between ->ttys[] and ->termios[]. Thats two objects, and the root of the problem. Given the size of struct ktermios it appears to be a win anyway to put it in the tty.
At that point tty_release can do what it should do.
> What do you think?
Second complication is some ttys have their own private ->shutdown.
It's possibly a useful optimisation and way of doing it *once* the termios tidy is done, but I think once that is done then ->shutdown goes away or becomes an non IRQ path event in tty_release.
> Anyway, I'm closing the merge window now (doing the tagging, booting > and checking that allmodconfig/allyesconfig/allnoconfigs all compile > fine) so it's 3.6 material, but it doesn't sound bad.
I've been gradually putting in places the bits leading up to the tty_lock fix. I hadn't realised that one needed to be ahead or was exposing the termios/tty array race.
I'll just go back and put the termios stuff further ahead and get that chunk right first. After that tty locking, and then we can worry about the real nasty which is that if we fix the open/close paths for console devices to be secure Fedora breaks because their userspace appears to be completely broken in this area.
Alan
| |