Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 1999 14:23:24 -0700 (PDT)
From:      Matthew Jacob <mjacob@feral.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Guido van Rooij <guido@gvr.org>, freebsd-hackers@FreeBSD.ORG, peter@FreeBSD.ORG
Subject:   Re: Holy cow - path component freeing a mess?  (was Re: D'oh!)
Message-ID:  <Pine.BSF.4.05.9906151422270.624-100000@semuta.feral.com>
In-Reply-To: <199906152055.NAA20771@apollo.backplane.com>

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

Umm, okay.... but I'm a little confused about how the zfree I'm adding to
nfs_nget falls under this. Am I being really stupid here?



On Tue, 15 Jun 1999, Matthew Dillon wrote:

>     This is totally screwed up:  The rules used to determine whether
>     a path component buffer ( struct componentname, sys/namei.h ) is freed
>     by a VOP routine or not are idiotic.
> 
>     As far as I can tell, the rule is:
> 
> 	* if no error is returned free the path component buffer, but only
> 	  if the SAVESTART flag is not set.
> 
> 	* If an error is returned, free the path component buffer whether
> 	  SAVESTART is set or not.
> 
>     Combine this with the callers which decide whether to set SAVESTART,
>     and the result is an extremely fragile mess.  Combine this with
>     VOP_ABORTOP's operation ( which frees the path component if SAVESTART is
>     not set ) and it gets even worse.
> 
>     Confused yet?
> 
>     At the very least, anyone who zfree's a path component should
>     clear the HASBUF flag so sanity checks can be added to the code.  The
>     nfs_serv.c code is unnecessarily complex due to this junkiness.
> 
>     I would like to fix this in the tree and add sanity checks.
> 
> 					-Matt
> 					Matthew Dillon 
> 					<dillon@backplane.com>
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 



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




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