Re: [PATCH -tip] x86: kvm/paging_tmpl.h intialize the variablebefore using it

From: Jaswinder Singh Rajput
Date: Mon May 25 2009 - 01:39:39 EST


On Mon, 2009-05-25 at 08:21 +0300, Avi Kivity wrote:
> Jaswinder Singh Rajput wrote:
> >> It's a false alarm. Isn't there a macro to shut up the warning?
> >>
> >>
> >
> > In arch/x86/kvm/paging_tmpl.h sptep is initialize only in :
> >
> > for_each_shadow_entry(vcpu, addr, iterator) {
> >
> > If we skip this, then we end up with wild sptep and returning it.
> >
> > Do you still think it is a false alarm ?
> >
>
> That loop always has at least one iteration.
>

hmm, In that case we should use a do-while flavor function so that the
compiler will also happy with it.

--
JSR

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