From owner-freebsd-current@FreeBSD.ORG Tue Sep 6 20:17:31 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E586216A41F; Tue, 6 Sep 2005 20:17:30 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26B8C43D45; Tue, 6 Sep 2005 20:17:29 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j86KHM7h026362; Tue, 6 Sep 2005 23:17:23 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) by orion.daedalusnetworks.priv (8.13.4/8.13.4) with ESMTP id j86KHMiI000629; Tue, 6 Sep 2005 23:17:22 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by orion.daedalusnetworks.priv (8.13.4/8.13.4/Submit) id j86KHLpf000628; Tue, 6 Sep 2005 23:17:21 +0300 (EEST) (envelope-from keramida@freebsd.org) X-Authentication-Warning: orion.daedalusnetworks.priv: keramida set sender to keramida@freebsd.org using -f Date: Tue, 6 Sep 2005 23:17:21 +0300 From: Giorgos Keramidas To: Craig Rodrigues Message-ID: <20050906201721.GA610@orion.daedalusnetworks.priv> References: <20050903133344.GA633@gothmog.gr> <20050905162713.GA92142@crodrigues.org> <20050905175826.GL69481@zxy.spb.ru> <20050906015418.GA590@gothmog.gr> <20050906120809.GP69481@zxy.spb.ru> <20050906124508.GA27413@orion.daedalusnetworks.priv> <20050906133221.GA903@crodrigues.org> <20050906140340.GA27780@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050906140340.GA27780@orion.daedalusnetworks.priv> Cc: rodrigc@freebsd.org, freebsd-current@freebsd.org, mirya@matrix.kiev.ua, Slawa Olhovchenkov Subject: Re: moused related panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 20:17:31 -0000 On 2005-09-06 17:03, Giorgos Keramidas wrote: > On 2005-09-06 09:32, Craig Rodrigues wrote: > > Can you try this: > > > > Index: scvidctl.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/dev/syscons/scvidctl.c,v > > retrieving revision 1.35 > > diff -u -u -r1.35 scvidctl.c > > --- scvidctl.c 30 Aug 2005 18:58:16 -0000 1.35 > > +++ scvidctl.c 6 Sep 2005 13:31:30 -0000 > > @@ -145,6 +145,8 @@ > > return ENODEV; > > > > /* adjust argument values */ > > + if (fontwidth <= 0) > > + fontwidth = info.vi_cwidth; > > if (fontsize <= 0) > > fontsize = info.vi_cheight; > > if (fontsize < 14) { > > This looks promising. I'll try it out, after reverting my local patch > in a while. Magnificent. This fixes the panics, even with the following KASSERT's which were left from yesterday, when I was trying to find out what scp->font_xxx values set_mouse_pos() got. %%% Index: scmouse.c =================================================================== RCS file: /home/ncvs/src/sys/dev/syscons/scmouse.c,v retrieving revision 1.38 diff -u -r1.38 scmouse.c --- scmouse.c 30 Aug 2005 18:58:16 -0000 1.38 +++ scmouse.c 6 Sep 2005 15:41:32 -0000 @@ -140,6 +140,9 @@ static void set_mouse_pos(scr_stat *scp) { + + KASSERT(scp != NULL, ("null scp")); + if (scp->mouse_xpos < scp->xoff*scp->font_width) scp->mouse_xpos = scp->xoff*scp->font_width; if (scp->mouse_ypos < scp->yoff*scp->font_size) @@ -158,6 +161,8 @@ } if (scp->mouse_xpos != scp->mouse_oldxpos || scp->mouse_ypos != scp->mouse_oldypos) { + KASSERT(scp->font_width > 0, ("invalid scp->font_width")); + KASSERT(scp->font_size > 0, ("invalid scp->font_size")); scp->status |= MOUSE_MOVED; scp->mouse_pos = (scp->mouse_ypos/scp->font_size - scp->yoff)*scp->xsize Index: scvidctl.c =================================================================== RCS file: /home/ncvs/src/sys/dev/syscons/scvidctl.c,v retrieving revision 1.35 diff -u -r1.35 scvidctl.c --- scvidctl.c 30 Aug 2005 18:58:16 -0000 1.35 +++ scvidctl.c 6 Sep 2005 15:17:22 -0000 @@ -145,6 +145,8 @@ return ENODEV; /* adjust argument values */ + if (fontwidth <= 0) + fontwidth = info.vi_cwidth; if (fontsize <= 0) fontsize = info.vi_cheight; if (fontsize < 14) { %%%