Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 1995 12:54:04 -0700
From:      Matt Dillon <dillon@blob.best.net>
To:        bde@zeta.org.au
Cc:        davidg@Root.COM, arch@FreeBSD.org, bugs@FreeBSD.org
Subject:   Re: possible ffs_vget() race condition
Message-ID:  <199507191954.MAA16549@blob.best.net>

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

>>:>#if 1
>>:>        if ((*vpp = ufs_ihashget(dev, ino)) != NULL) {
>>:>                vp->v_data = NULL;
>>:
>>:I think it clobbers the in-use v_data here.  I think you should lock
>>:the vnode before possibly blocking.
>
>>    Hmm... I was under the impression that the whole of the newly
>>    allocated vnode (vp) at that point in the code had yet to be 
>>    associated with anything.  i.e. that nobody else would have any
>
>Yes; I confused *vpp with vp.
>
>Bruce

    Urk... The OS just hit the hole, so I guess it's a real problem! <grin>
    And, unfortunately, panic'd trying to access the inode through 
    vp->v_data which I had NULL'd out in my patch... so, obviously, I 
    am not freeing it properly.

    If someone could email me the proper way to free it at this point (where
    we've allocated the vnode but then determine we have to throw it out
    due to a duplicate before we setup the inode for it), I'd appreciate it.

					-Matt




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