Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Oct 2001 11:59:52 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Jonathan Lemon <jlemon@flugsvamp.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:  <200110241859.f9OIxqs97073@apollo.backplane.com>
References:  <200110230121.f9N1LTa24181@freefall.freebsd.org> <7mg089l1bn.wl@waterblue.imgsrc.co.jp> <200110241838.f9OIcCR96868@apollo.backplane.com> <20011024135503.C75389@prism.flugsvamp.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

    The panic is due to v_writecount not being properly adjusted.  If a
    vnode is opened with FWRITE in vn_open(), then it must be closed with
    VWRITE in vn_close() or v_writecount will not be properly adjusted and cause
    the panic in question to occur later in vrele(). 

    I suspect that this is the problem with the devfs/console code.

						-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?200110241859.f9OIxqs97073>