tty_io.c - disassociate_ctty attempted to write to tty = NULLquestion/problem?

From: Michael Breuer
Date: Mon Jan 04 2010 - 18:02:01 EST


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.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/