Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 1999 20:00:59 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "David E. Cross" <crossd@cs.rpi.edu>
Cc:        Chuck Robey <chuckr@picnic.mat.net>, David Scheidt <dscheidt@enteract.com>, Chan Yiu Wah <c5666305@hkstar.com>, freebsd-current@FreeBSD.ORG, crossd@cs.rpi.edu
Subject:   Re: What happened to CTM src-cur? 
Message-ID:  <199906150300.UAA13883@apollo.backplane.com>
References:   <199906150028.UAA22149@cs.rpi.edu>

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

:Yes, that was far from my final patch :) It was intended for those with more
:clue, and a fresh look at the code (such as yourself ;) to help me out.  
:I don't believe that we have handled all the problems, I believe almost 
:any "error" condition may cause this... there are multiple points at which
:"error=" occurs, and it would seem to suggest that any may lead to this.  I
:have a giant printout of this routine and I am atytempting to trace all the 
:code paths.  

    Hmm.. yes, you are right, it looks like there is another case
    around line 1440 of nfs_serv.c.

                        if (!error) {
                                nfsrv_object_create(nd.ni_vp);
                                zfree(namei_zone, nd.ni_cnd.cn_pnbuf);
                                if (exclusive_flag) {
                                        exclusive_flag = 0;
                                        VATTR_NULL(vap);
                                        bcopy(cverf, (caddr_t)&vap->va_atime,
                                                NFSX_V3CREATEVERF);
      >>>>>>>>>                         error = VOP_SETATTR(nd.ni_vp, vap, cred,
                                                procp);
                                }
                        }

    There is a possible case in handling the VOP_MKNOD call at line 
    1459.  The section of code at line 1469 sets error but does not
    dispose of the vp anywhere later on:

                        if ((error = lookup(&nd)) != 0) {
                                zfree(namei_zone, nd.ni_cnd.cn_pnbuf);
                                nfsm_reply(0);
                        }

    Those are the only other two cases I can see.  The other places
    where error is returned should leave nd.ni_vp NULL.

    The easiest solution is to track the vp and NULL it out whenever
    it gets vput, then put an KASSERT where the code returns to make
    sure vp is NULL.

:Could someone provide an indication as to what (paraphrasing) "vattr->va_size
:=-1" would parse to in english?

    I don't know.  Yet :-)

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

:--
:David Cross
:The source will be with you, always.



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?199906150300.UAA13883>