Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Oct 2001 13:55:03 -0500
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Jun Kuriyama <kuriyama@imgsrc.co.jp>, David Wolfskill <david@catwhisker.org>, Jonathan Lemon <jlemon@flugsvamp.com>, Current <FreeBSD-current@FreeBSD.ORG>
Subject:   Re: panic: vrele: missed vn_close
Message-ID:  <20011024135503.C75389@prism.flugsvamp.com>
In-Reply-To: <200110241838.f9OIcCR96868@apollo.backplane.com>
References:  <200110230121.f9N1LTa24181@freefall.freebsd.org> <7mg089l1bn.wl@waterblue.imgsrc.co.jp> <200110241838.f9OIcCR96868@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hmm.  The way the revamped console code works is this:

  cn_devopen() calls vn_open() to open the device.  If this is not a 
VCHR device, then it is closed.  Otherwise, the vnode is stashed in
cnd->cnd_vp.

  When the device is closed though cnclose(), it walks through a list
of console devices, and if cnd_vp != NULL, calls vn_close() for that 
vnode, and then NULLs out cnd_vp. (drops the reference.)

  My understanding is that vn_open/vn_close will track the count of 
outstanding references to the vnode, so this should be safe to do.
-- 
Jonathan


On Wed, Oct 24, 2001 at 11:38:12AM -0700, Matthew Dillon wrote:
> 
> :...
> :Sttopped at Debugger+0x44:  pushl    %ebx
> :db> trace
> :Debugger()
> :panic()
> :vrele()
> :vn_close()
> :cnclose()
> :spec_close()
> :spec_vnoperate()
> :vclean()
> :vgonel()
> :vgone()
> :vop_revoke()
> :devfs_revoke()
> :exit1()
> :...
> 
>     In looking at a diff in the last few days, a huge number of changes have been
>     made kern/tty_cons.c by jlemon.  Since the area of the panic is around the same
>     block of code there's a good chance that these changes are the cause, though I
>     have not tested this.  If so, Jonathan can locate the bug much more quickly then
>     I can.
> 
> 						-Matt

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




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