Re: [PATCH] ext4: let ext4_ext_convet_to_initialized initialize var(eh) before using it

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

 



[Resend of my earlier message with HTML gunk removed and one edit. ]

On Tue, Nov 1, 2011 at 15:52, Ted Ts'o <tytso@xxxxxxx> wrote:
>
> On Tue, Nov 01, 2011 at 09:21:21AM +0800, Yongqiang Yang wrote:
> > ext4_ext_convert_to_initialized() does not initialize eh before using it
> > and this is introduced in commit 864d21652.
> >
> > Cc:Eric Gouriou <egouriou@xxxxxxxxxx>
> > Cc:"Theodore Ts'o" <tytso@xxxxxxx>
> > Signed-off-by: Yongqiang Yang <xiaoqiangnk@xxxxxxxxx>
>
> >               eof_block = map->m_lblk + map->m_len;
> >
> >       depth = ext_depth(inode);
> > +     eh = path[depth].p_hdr;
> >       ex = path[depth].p_ext;
> >       ee_block = le32_to_cpu(ex->ee_block);
> >       ee_len = ext4_ext_get_actual_len(ex);
>
> Hmmm, nice catch.
>
> Looks like Eric dropped this line when he forward ported this patch to
> v3.1.

Indeed I screwed up. Apologies for the trouble. I tested the patch thoroughly
on our kernel version, ported it to ~ 2.6.39 and tested. This was a few months
ago and could not find the time to complete the work then. When I got a chance
to resume the effort, the upstream kernel had changed but I was not supposed
to even build it due to security concerns with the kernel.org sources.
So I redid
the port blind, verified [the file] built but did not test.

>  Interestingly, I did test this using xfstests, and it didn't
> complain.  Which probably means we don't have a good test coverage
> that triggers the specific preconditions of this optimization.  Oops.
> I'll fix this up now.
>
> Eric, when you have a chance, could you work up an xfstests test that
> automates the various tests that you ran manually when you developed
> this patch?  Thanks!!

Sure, but the "chance" may not manifest itself soon.

 Eric

>
>                                                - Ted
--
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