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

Re: [PATCH 2/3] tools/libxenstat: don't skip the /proc/net/dev check after a failure


  • To: Olivier Lambert <olivier.lambert@xxxxxxxxxx>
  • From: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 13:55:37 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Feedback-ID"
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Fri, 16 Oct 2026 11:55:52 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, 16 Oct 2026 09:12:58 +0000, Olivier Lambert 
<olivier.lambert@xxxxxxxxxx> wrote:
> xenstat_collect_networks() opens /proc/net/dev once and validates its
> header before using it. If reading the header fails, or the header isn't
> the expected one, an error is returned but the stream is left open in
> priv->procnetdev. The next call then finds the stream already open,
> skips the validation and parses the file anyway.
> 
> Close the stream and clear the pointer on both error paths, so that the
> validation is done again on the next call.
> 
> [...]

Reviewed-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>

-- 
Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.