From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] tools/xenconsoled: Initialise static data before use Date: Thu, 7 Mar 2013 18:54:17 +0000 Message-ID: <5138E259.8050809@citrix.com> References: <803a5869bfb532aff605.1362681902@andrewcoop.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <803a5869bfb532aff605.1362681902@andrewcoop.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" Cc: Ian Jackson , Wei Liu , Ian Campbell , Marcus Granado List-Id: xen-devel@lists.xenproject.org On 07/03/13 18:45, Andrew Cooper wrote: > 'fds' and 'current_array_size' are used in a memset() in reset_fds(), and for > the first call to set_fds() before being initialised. > > Also initialise nr_fds for sanity sake. > > This is another regression introduced by > > "Switch from select() to poll() in xenconsoled's IO loop." > hg c/s 26405:7359c3122c5d > git cc5434c933153c4b8812d1df901f8915c22830a8 > > Signed-off-by: Andrew Cooper > Signed-off-by: Marcus Granado > > --- > > This is still not enough to fix the issue of xenconsoled exiting after 384 > VMs, but does allow us to reliably reach the 383rd VM. On second thoughts, memset(NULL, 0, 0); is still silly. I shall resin tomorrow. ~Andrew > > diff -r 94ece33caae2 -r 803a5869bfb5 tools/console/daemon/io.c > --- a/tools/console/daemon/io.c > +++ b/tools/console/daemon/io.c > @@ -70,9 +70,9 @@ static int log_hv_fd = -1; > > static xc_gnttab *xcg_handle = NULL; > > -static struct pollfd *fds; > -static unsigned int current_array_size; > -static unsigned int nr_fds; > +static struct pollfd *fds = NULL; > +static unsigned int current_array_size = 0; > +static unsigned int nr_fds = 0; > > #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel