public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* tty_io.c  - disassociate_ctty attempted to write to tty = NULL question/problem?
@ 2010-01-04 23:01 Michael Breuer
  2010-01-05  0:12 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Breuer @ 2010-01-04 23:01 UTC (permalink / raw)
  To: linux-kernel

While looking into something else, had debugging turned on and came 
across this:
Jan  1 15:11:42 mail kernel: error attempted to write to tty [0x(null)] 
= NULL

[running 2.6.32 from git - with the recent devpts ionode patch applied]

Looks like this happens when (at least in my case), init retarts mingetty.

Basically:

do_exit -> disassocate_ctty(1) (for tty1).
disassociate->vhangup->do_tty_hangup

In do_tty_hangup, p->signal->tty is set to NULL, where p==current.

On return, the aforementioned error message is generated.

I'm thinking that the cleanup of the tty structure is therefore not 
happening properly. I wrote a small patch to enter the cleanup code 
anyway in this once instance and saw no changes to the system behavior.

Main question is what should be going on here? From my testing, it looks 
like this pretty much a special case involving init->mingetty start/stop 
on the tty where the console is connected (usually tty1).

I got here by trying to figure out why I'm getting sky2 interrupt errors 
- but only when I've got a mingetty running on tty1.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-05 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04 23:01 tty_io.c - disassociate_ctty attempted to write to tty = NULL question/problem? Michael Breuer
2010-01-05  0:12 ` Alan Cox
2010-01-05  5:48   ` Michael Breuer
2010-01-05 10:47     ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox