From owner-cvs-all Tue May 28 6:29:34 2002 Delivered-To: cvs-all@freebsd.org Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by hub.freebsd.org (Postfix) with ESMTP id B991437B400; Tue, 28 May 2002 06:29:19 -0700 (PDT) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.6/8.11.6) id g4SDT2286631; Tue, 28 May 2002 15:29:02 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200205281329.g4SDT2286631@zibbi.icomtek.csir.co.za> Subject: Re: cvs commit: src/sys/sys tty.h src/sys/kern tty.c In-Reply-To: from Dag-Erling Smorgrav at "May 28, 2002 03:07:44 pm" To: des@ofug.org (Dag-Erling Smorgrav) Date: Tue, 28 May 2002 15:29:02 +0200 (SAT) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > 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