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

Re: [PATCH for-4.13] tools/libxl: Fix memory leak in libxl_cpuid_set()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Mon, 15 Jun 2020 15:48:48 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Mon, 15 Jun 2020 14:49:01 +0000
  • Ironport-sdr: nv3msrCV/3R+lRdCS9IwrDpR1FfYf6iFAp+/8txCAc3V4Uc9H7cWJ+cE69CP0pqrFFyDQDW3QU J6rHz38DSTPCKPkg+4Lt6F1+LUfTzeIbL4/UpgjsUJugzqSWkymvVV8yALgCwNJ2qsYZe7Fxg7 GhvCsbpMpzw/r1xg+qUZsj+2UsyTD9i5uknjqPh03gMyJ8CfeN0wibg6bHwNXArrLoP7Sd3Chu Z4Hvhziqev/AT7vtdwBpyLspjdP0xCGkJlg+KQufptDA9AZczqlRHtrU7wnKt9Z8pucbXz4Sek Eds=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Andrew Cooper writes ("[PATCH for-4.13] tools/libxl: Fix memory leak in 
libxl_cpuid_set()"):
> xc_cpuid_set() returns allocated memory via cpuid_res, which libxl needs to
> free() seeing as it discards the results.
> 
> This is logically a backport of c/s b91825f628 "tools/libxc: Drop
> config_transformed parameter from xc_cpuid_set()" but rewritten as one caller
> of xc_cpuid_set() does use returned values.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
> 
> Applicable for 4.13 and older.

Thanks.  I have committed this to 4.13 and 4.12.
4.12 is no longer supported for bugfixes like this one.

> I'm not going to touch the Ocaml bindings - they're wrong in multiple ways
> including this memory leak, and we deleted them in 4.14 because they were
> totally unused.

That makes sense to me.

Ian.



 


Rackspace

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