Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Dec 1997 09:09:37 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Sean Eric Fagan <sef@FreeBSD.ORG>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/miscfs/procfs procfs_subr.c 
Message-ID:  <25216.881654977@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 08 Dec 1997 21:03:43 PST." <199712090503.VAA25960@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

VNODES 201:
-----------

The problem is that the vnodes that you are trying to get rid of
are no longer yours to vgone().

You need to store the generation number in v_id together with the
vnode pointer, and before you use that vnode, you need to check that
the generation number has not changed.

The alternative is to hold a reference to the vnode all the time
and only let go of it when the process dies.

Poul-Henning

In message <199712090503.VAA25960@freefall.freebsd.org>, Sean Eric Fagan writes
:
>sef         1997/12/08 21:03:43 PST
>
>  Modified files:
>    sys/miscfs/procfs    procfs_subr.c 
>  Log:
>  Code to prevent a panic caused by procfs_exit().  Note that i don't know
>  what is teh root cause -- but, sometimes, a procfs vnode in pfshead is
>  apparantly corrupt (or a UFS vnode instead).  Without this patch, I can
>  get it to panic by doing (in csh)
>  
>  	while (1)
>  		ps auxwww
>  	end
>  
>  and it will panic when the PID's wrap.  With it, it does not panic.
>  Yes -- I know that this is NOT the right way to fix it.  But I haven't
>  been able to get it to panic yet (which confuses me).  I am going to
>  be looking into the vgone() code now, as that may be a part of it.
>  
>  Revision  Changes    Path
>  1.20      +11 -3     src/sys/miscfs/procfs/procfs_subr.c
>

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."



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