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

From: Alan Cox
Date: Mon Jan 04 2010 - 19:09:26 EST


> 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.

Perfectly reasonable so far - the current process gave up having a
controlling tty.

> On return, the aforementioned error message is generated.

>From where - the backtrace on the write to NULL tty is the important bit
here. User space interfaces cache tty in filp->private_data so its not
going to be coming from there unless there was a memory scribble which
would imply a refcounting bug - and I'd expect people to hit that
reliably.

Some kernel stuff does take a peek at p->signal->tty for direct printk
type stuff and that sounds more likely - the backtraceon the write to
NULL tty is going to provide the needed info.

Alan
--
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/