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

Re: [PATCH for-4.14] tools: fix error path of xendevicemodel_open()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Fri, 12 Jun 2020 16:26:46 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 12 Jun 2020 15:26:59 +0000
  • Ironport-sdr: DI+pjL4dvpHEJgezwSfZX9iLTzdW2HCD4Sdh/UvCMgrnmIxNbmKyCLP+qYrOLAZHAPkx148IEa +sMK2qCoonwF4s8KfIKsbmRHx/IY6CIDo7zvPc66V+OLGPVtIybqCBd1rSalgm3M2L43HufPd4 NJAj6voEeLUOAsZZ2UFJHIzfcLR0+XAazZEyqVcxi8JsJ5ix1no8wr/40Bu7nYBpuihx/XWFrM gqDtVsyWkhIpVZeZiMgjh0vD1PhWhIgjmMpaWcph01wDgAZfDhvc3atfasD+8qlAD+TA+yS/N1 rqs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Andrew Cooper writes ("[PATCH for-4.14] tools: fix error path of 
xendevicemodel_open()"):
> c/s 6902cb00e03 "tools/libxendevicemodel: extract functions and add a compat
> layer" introduced calls to both xencall_open() and osdep_xendevicemodel_open()
> but failed to fix up the error path.
> 
> c/s f68c7c618a3 "libs/devicemodel: free xencall handle in error path in
> _open()" fixed up the xencall_open() aspect of the error path (missing the
> osdep_xendevicemodel_open() aspect), but positioned the xencall_close()
> incorrectly, creating the same pattern proved to be problematic by c/s
> 30a72f02870 "tools: fix error path of xenhypfs_open()".
> 
> Reposition xtl_logger_destroy(), and introduce the missing
> osdep_xendevicemodel_close().

Reviewed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

I notice that the tail of xendevicemodel_open is now identical to
xendevicemodel_close.  I think this is expected, and that it would be
better to combine the two sets of code.  If they hadn't been separate
then we might have avoided this bug...

Ian.



 


Rackspace

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