Experimental ttwwakeup() panic patch

Doug White dwhite at gumbysoft.com
Wed May 11 20:36:09 PDT 2005

Sorry for the late reply on this.

On Fri, 6 May 2005, Ed Maste wrote:

> On Wed, May 04, 2005 at 08:54:23PM -0700, Doug White wrote:
> > > http://people.freebsd.org/~dwhite/tty.c.20050503.patch
> >
> > This patch has been committed and exists as rev of
> > src/sys/kern/tty.c.  Please let me know if this fixes the panic for you,
> > or causes new problems :)
> For what it's worth, I've come across a similar crash during a test that
> repeatedly ssh'd into the machine.
> This was while opening a pty, not using serial console.  The symptoms
> seem similar; my tty struct has a struct knlist with a null struct mtx *.
> I haven't yet investigated in great detail or tried the patch.  I just
> wanted to offer this as another data point.
> Although kgdb gets confused during the backtrace (frames 7 and 8) the
> tf_eip is a cmpxchg in knote().

This is a problem mlaier and I may have fixed, at least against -CURRENT.
It appears that the process group alias in struct tty is accessed without
locking and its changing out from under us.

Give this a try:


It compiles but I haven't actually booted a kernel with it, so YMMV.

Doug White                    |  FreeBSD: The Power to Serve
dwhite at gumbysoft.com          |  www.FreeBSD.org

More information about the freebsd-stable mailing list