[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1210041106560.29232@kaball.uk.xensource.com>
Date: Thu, 4 Oct 2012 11:07:46 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Jan Beulich <JBeulich@...e.com>
CC: Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
Ian Campbell <Ian.Campbell@...rix.com>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [Xen-devel] [PATCH] xen/xen_initial_domain: check that xen_start_info
is initialized
On Thu, 4 Oct 2012, Jan Beulich wrote:
> >>> On 03.10.12 at 19:08, Stefano Stabellini <Stefano.Stabellini@...citrix.com>
> wrote:
> > Since commit commit 4c071ee5268f7234c3d084b6093bebccc28cdcba ("arm:
> > initial Xen support") PV on HVM guests can be xen_initial_domain.
> > However PV on HVM guests might have an unitialized xen_start_info, so
> > check before accessing its fields.
> >
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@...citrix.com>
> > Acked-by: Ian Campbell <Ian.Campbell@...rix.com>
> > Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> >
> > diff --git a/include/xen/xen.h b/include/xen/xen.h
> > index 9a39ca5..e7101bb 100644
> > --- a/include/xen/xen.h
> > +++ b/include/xen/xen.h
> > @@ -28,7 +28,7 @@ extern enum xen_domain_type xen_domain_type;
> > #include <asm/xen/hypervisor.h>
> >
> > #define xen_initial_domain() (xen_domain() && \
> > - xen_start_info->flags & SIF_INITDOMAIN)
> > + xen_start_info && xen_start_info->flags & SIF_INITDOMAIN)
> > #else /* !CONFIG_XEN_DOM0 */
> > #define xen_initial_domain() (0)
> > #endif /* CONFIG_XEN_DOM0 */
>
> Didn't your other patch statically initialize it?
Yes. Even though both patches can safely coexist, I wrote this one as an
alternative solution.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists