From owner-freebsd-current Wed Oct 24 14:46: 2 2001 Delivered-To: freebsd-current@freebsd.org Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by hub.freebsd.org (Postfix) with ESMTP id 5125B37B403 for ; Wed, 24 Oct 2001 14:45:55 -0700 (PDT) Received: (from david@localhost) by bunrab.catwhisker.org (8.11.6/8.11.6) id f9OLjrY46481; Wed, 24 Oct 2001 14:45:53 -0700 (PDT) (envelope-from david) Date: Wed, 24 Oct 2001 14:45:53 -0700 (PDT) From: David Wolfskill Message-Id: <200110242145.f9OLjrY46481@bunrab.catwhisker.org> To: current@freebsd.org, jlemon@flugsvamp.com Subject: Re: panic: vrele: missed vn_close Cc: david@catwhisker.org, kuriyama@imgsrc.co.jp In-Reply-To: <20011024151252.F75389@prism.flugsvamp.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Date: Wed, 24 Oct 2001 15:12:52 -0500 >From: Jonathan Lemon >> I suspect that this is the problem with the devfs/console code. >Ugh. Probably. The console code tries to remember what flag was >used from the open, but doesn't use that flag during close. >Here's an (untested) patch - essentially it forces the FWRITE flag >always on, to avoid this problem. Possibly the right thing to do >is to used a fixed set of flags to open the console, and completely >ignore the user's specified mode. OK; that patch seems to have needed a small tweak -- using FWRITE implies that it's defined, so I need to include sys/fcntl.h; cvs diff follows my uname ouput: FreeBSD m147.whistle.com 5.0-CURRENT FreeBSD 5.0-CURRENT #146: Wed Oct 24 14:28:45 PDT 2001 root@m147.whistle.com:/common/C/obj/usr/src/sys/LAPTOP_30W i386 Index: sys/kern/tty_cons.c =================================================================== RCS file: /cvs/freebsd/src/sys/kern/tty_cons.c,v retrieving revision 1.93 diff -u -r1.93 tty_cons.c --- sys/kern/tty_cons.c 23 Oct 2001 20:25:50 -0000 1.93 +++ sys/kern/tty_cons.c 24 Oct 2001 21:19:23 -0000 @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -365,7 +366,7 @@ { struct cn_device *cnd; - openflag = flag; + openflag = flag | FWRITE; /* XXX */ cn_is_open = 1; /* console is logically open */ if (cn_mute) return (0); @@ -382,7 +383,7 @@ STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { if (cnd->cnd_vp == NULL) continue; - vn_close(cnd->cnd_vp, mode, td->td_proc->p_ucred, td); + vn_close(cnd->cnd_vp, openflag, td->td_proc->p_ucred, td); cnd->cnd_vp = NULL; } cn_is_open = 0; Anyway, I'm up & running multi-user on today's -CURRENT. I wouldn't take this as proof that the patch is correct, but it's a definite improvement in behavior.... :-) Thanks, david -- David H. Wolfskill david@catwhisker.org As a computing professional, I believe it would be unethical for me to advise, recommend, or support the use (save possibly for personal amusement) of any product that is or depends on any Microsoft product. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message