Re: ext3: ext4: Using uninitialized value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roman Borisov wrote:
> On 10/13/2010 10:56 PM, ext Andreas Dilger wrote:
>>> that was introduced with:
>>> >
>>> >  commit acfa1823d33859b0db77701726c9ca5ccc6e6f25
>>> >  Author: Andreas Dilger<adilger@xxxxxxxxxxxxx>
>>> >  Date:   Thu Jun 23 00:09:45 2005 -0700
>>> >
>>> >     [PATCH] Support for dx directories in ext3_get_parent (NFSD)
>>> >
>>> >  so maybe Andreas knows offhand;)   but I think:
>> Your analysis is correct.  I agree it's a bit convoluted, but it
>> avoids replicating a bunch of code.
>>
> 
> Thanks a lot! it make sence.
> 
> But I just wondering why hash = hinfo->hash is located in separate scope
> where it looks like unitialized.
> The same situation in namei.c/dx_probe():
>     if (entry)
>         ext3fs_dirhash(entry->name, entry->len, hinfo);
>     hash = hinfo->hash;
> I believe that the implementation doesn't allow to use hash value when
> !entry but why it wasn't designed like:
>     if (entry)
>     {
>         ext3fs_dirhash(entry->name, entry->len, hinfo);
>         hash = hinfo->hash;
>     }
> for example?

Just a guess, but gcc might start complaining then ;)  (It wasn't smart
enough to see the potential problem with the other way...)

-Eric

> Roman

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux