Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2002 15:29:02 +0200 (SAT)
From:      John Hay <jhay@icomtek.csir.co.za>
To:        des@ofug.org (Dag-Erling Smorgrav)
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys tty.h src/sys/kern tty.c
Message-ID:  <200205281329.g4SDT2286631@zibbi.icomtek.csir.co.za>
In-Reply-To: <xzpznyk5skf.fsf@flood.ping.uio.no> from Dag-Erling Smorgrav at "May 28, 2002 03:07:44 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> > This causes a kernel panic when booting.
> 
> Weird, I've been running a kernel with that patch for days.  Try with
> the latest version?

I'm running as late as cvsup/cvs will give me which is 1.179. This
patch fix the panics for me. At first I only added the if (tp->t_dev)
check, but then I paniced a few lines further. I don't know if this
is perfect, but the panics are gone and I can remotely log in, so I'm
happy. :-)

John
-- 
John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org


Index: sys/kern/tty.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/tty.c,v
retrieving revision 1.179
diff -u -r1.179 tty.c
--- sys/kern/tty.c	28 May 2002 06:53:41 -0000	1.179
+++ sys/kern/tty.c	28 May 2002 12:30:20 -0000
@@ -2593,12 +2593,15 @@
 		xt.xt_cancc = tp->t_canq.c_cc;
 		xt.xt_outcc = tp->t_outq.c_cc;
 		XT_COPY(line);
-		xt.xt_dev = dev2udev(tp->t_dev);
+		if (tp->t_dev)
+			xt.xt_dev = dev2udev(tp->t_dev);
 		XT_COPY(state);
 		XT_COPY(flags);
 		XT_COPY(timeout);
-		xt.xt_pgid = tp->t_pgrp->pg_id;
-		xt.xt_sid = tp->t_session->s_sid;
+		if (tp->t_pgrp)
+			xt.xt_pgid = tp->t_pgrp->pg_id;
+		if (tp->t_session)
+			xt.xt_sid = tp->t_session->s_sid;
 		XT_COPY(termios);
 		XT_COPY(winsize);
 		XT_COPY(column);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205281329.g4SDT2286631>