Non init'ed "nd" in svc_export_parse() ?
Christoph Hellwig
hch at infradead.org
Fri Jul 13 05:39:35 EDT 2007
On Thu, Jul 05, 2007 at 04:07:41PM +0200, Zoltan Menyhart wrote:
> There is a "struct nameidata nd" allocated on the call frame of
> svc_export_parse().
> Only "nd.dentry" is initialized to NULL before calling
> path_lookup(buf, 0, &nd).
> I had a look at the other places where path_lookup() is called.
> Apparently svc_export_parse() does not initialize some fields
> which are init'ed elsewhere, before calling path_lookup(), e.g.
> "nd.intent.*".
> Should not be these fields be init'ed to some reasonable value?
A nameidata that's not fully initialized is a very bad thing, but
that's not the case here. path_lookup initialized the nameidata
and then calls path_walk so things are fine. The only confusing
thing here is that the code is doing the useless initialization
of nd.dentry. Feel free to remove that one to clear up the situation.
More information about the NFSv4
mailing list