Messages in this thread | | | Date | Sat, 31 May 2008 14:43:45 +0100 | From | Alan Cox <> | Subject | Re: [PATCH 1/1] Char: tty_io, fix closecount counting |
| |
> It is ever vcs1, which is /dev/console and it is the only treated separately > (otherwise I think we would have more (and distinct) reports like this). > When the console is HUPped? And what should happen with openers? The > 2.6.22+suse happened when sulogin /dev/console was invoked. Any ideas how to > track this down?
Its a complete and total mess is the obvious answer. In fact its far worse than it first looks and I don't believe it can be fixed without reworking the whole printk/console stuff.
I spent several days this week mapping out how the tty open/close/hangup logic works and to be honest what I've learned is
- It doesn't - It can't be easily fixed to - There are numerous races - The whole "tty/console" abstraction for printk type stuff is totally broken by design and replicated in several places for good measure.
At this point I have to say I can't even see a way to get from the existing tty open/close/hangup logic to a working one which does not involve changes to every driver with a 'flag day' type switch between the two implementations.
For the existing codebase I think the best we can do in this area is label it "condemned" and not touch it, because any change will be unpredictable in its effect and not a real fix.
I'd love to be proved wrong. Doing a grand reimplementation of large chunks of the tty layer isn't what I want to do, I just see no alternative at this point.
Alan
| |