From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH] libxl: include a XLU_Config in _libxlDriverConfig Date: Thu, 7 May 2015 09:57:06 +0100 Message-ID: <20150507085706.GA29004__36463.3129247979$1430989125$gmane$org@zion.uk.xensource.com> References: <1430203205-27806-1-git-send-email-olaf@aepfle.de> <20150505075434.GA26431@zion.uk.xensource.com> <20150506080759.GA10182@aepfle.de> <20150506085811.GA28064@aepfle.de> <20150506091345.GD23664@zion.uk.xensource.com> <20150507082023.GA20349@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150507082023.GA20349@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: libvir-list@redhat.com, Jim Fehlig , Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, May 07, 2015 at 10:20:23AM +0200, Olaf Hering wrote: > On Wed, May 06, Wei Liu wrote: > > > On Wed, May 06, 2015 at 10:58:11AM +0200, Olaf Hering wrote: > > > On Wed, May 06, Olaf Hering wrote: > > > > > > > Since libvirtd runs forever there is very little code to undo most > > > > things. But I will see if there is any unload function, did not actively > > > > look for such thing. > > > > > > Looking through libxlStateDriver it seems that libxl and libxlu remains > > > as is. Not sure if thats supposed that way or if perhaps libxl should be > > > fully reinitialized during ->stateReload, and if logfiles should be > > > closed in ->stateCleanup. > > > > > > > FWIW libxl ctx is destroy in libxlDriverConfigDispose. You can probably > > just call xlu_cfg_destroy there. > > In libvirt libxlDriverConfigDispose calls both libxl_ctx_free and > xtl_logger_destroy. Both functions check if the input is valid, just > xlu_cfg_destroy dereferences the input unconditionally. Should > xlu_cfg_destroy be changed to do nothing if it gets passed a NULL > pointer? > That is orthogonal to this patch. I don't particularly care if it's NULL-tolerant or not. In any case, You will need to check validity for older libxl's xlu_cfg_destroy. Wei. > Olaf