* [PATCH] libxl: Initialize valid_devs in output_topologyinfo()
@ 2015-05-15 15:06 Boris Ostrovsky
2015-05-18 9:48 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2015-05-15 15:06 UTC (permalink / raw)
To: ian.jackson, ian.campbell, wei.liu2, stefano.stabellini
Cc: olaf, boris.ostrovsky, xen-devel
Commit e78e8b9bb649 ("libxl: Add interface for querying hypervisor
about PCI topology") neglected to initialize valid_devs. This
may result in not printing a message to console if no IO topology
information is available and, more importantly, may break non-debug
builds on some versions of gcc.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reported-by: Olaf Hering <olaf@aepfle.de>
---
tools/libxl/xl_cmdimpl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 373aa37..6d60ce4 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -5423,7 +5423,7 @@ static void output_topologyinfo(void)
libxl_cputopology *cpuinfo;
int i, nr;
libxl_pcitopology *pciinfo;
- int valid_devs;
+ int valid_devs = 0;
cpuinfo = libxl_get_cpu_topology(ctx, &nr);
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libxl: Initialize valid_devs in output_topologyinfo()
2015-05-15 15:06 [PATCH] libxl: Initialize valid_devs in output_topologyinfo() Boris Ostrovsky
@ 2015-05-18 9:48 ` Wei Liu
2015-05-21 14:52 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2015-05-18 9:48 UTC (permalink / raw)
To: Boris Ostrovsky
Cc: olaf, wei.liu2, ian.campbell, stefano.stabellini, ian.jackson,
xen-devel
On Fri, May 15, 2015 at 11:06:57AM -0400, Boris Ostrovsky wrote:
> Commit e78e8b9bb649 ("libxl: Add interface for querying hypervisor
> about PCI topology") neglected to initialize valid_devs. This
> may result in not printing a message to console if no IO topology
> information is available and, more importantly, may break non-debug
> builds on some versions of gcc.
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Reported-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/libxl/xl_cmdimpl.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 373aa37..6d60ce4 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -5423,7 +5423,7 @@ static void output_topologyinfo(void)
> libxl_cputopology *cpuinfo;
> int i, nr;
> libxl_pcitopology *pciinfo;
> - int valid_devs;
> + int valid_devs = 0;
>
>
> cpuinfo = libxl_get_cpu_topology(ctx, &nr);
> --
> 1.7.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libxl: Initialize valid_devs in output_topologyinfo()
2015-05-18 9:48 ` Wei Liu
@ 2015-05-21 14:52 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-05-21 14:52 UTC (permalink / raw)
To: Wei Liu; +Cc: Boris Ostrovsky, xen-devel, ian.jackson, olaf, stefano.stabellini
On Mon, 2015-05-18 at 10:48 +0100, Wei Liu wrote:
> On Fri, May 15, 2015 at 11:06:57AM -0400, Boris Ostrovsky wrote:
> > Commit e78e8b9bb649 ("libxl: Add interface for querying hypervisor
> > about PCI topology") neglected to initialize valid_devs. This
> > may result in not printing a message to console if no IO topology
> > information is available and, more importantly, may break non-debug
> > builds on some versions of gcc.
> >
> > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> > Reported-by: Olaf Hering <olaf@aepfle.de>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Thanks, but I already just applied a similar looking patch from Charles
Arnold.
>
> > ---
> > tools/libxl/xl_cmdimpl.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> > index 373aa37..6d60ce4 100644
> > --- a/tools/libxl/xl_cmdimpl.c
> > +++ b/tools/libxl/xl_cmdimpl.c
> > @@ -5423,7 +5423,7 @@ static void output_topologyinfo(void)
> > libxl_cputopology *cpuinfo;
> > int i, nr;
> > libxl_pcitopology *pciinfo;
> > - int valid_devs;
> > + int valid_devs = 0;
> >
> >
> > cpuinfo = libxl_get_cpu_topology(ctx, &nr);
> > --
> > 1.7.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-21 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 15:06 [PATCH] libxl: Initialize valid_devs in output_topologyinfo() Boris Ostrovsky
2015-05-18 9:48 ` Wei Liu
2015-05-21 14:52 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).