<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 20, 2017 at 12:52 AM, Erik Skultety <span dir="ltr"><<a href="mailto:eskultet@redhat.com" target="_blank">eskultet@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Wed, Sep 20, 2017 at 09:03:18AM +0200, Erik Skultety wrote:<br>
> On Tue, Sep 19, 2017 at 09:58:34PM -0700, Ashish Mittal wrote:<br>
> > Passing a NULL value for the argument secAlias to the function<br>
> > qemuDomainGetTLSObjects causes a segmentation fault.<br>
> ><br>
> > Thread 3 "libvirtd" received signal SIGSEGV, Segmentation fault.<br>
> > 0x00007f97c9c42a3d in qemuDomainGetTLSObjects (...,secAlias=0x0)<br>
> > at qemu/qemu_hotplug.c:1736<br>
><br>
> Can you provide the whole backtrace? Because from what I see in the code,<br>
> qemuDomainGetTLSObjects is called from qemu_hotplug.c and qemu_migration.c, but<br>
> none of the code paths would result in qemuDomainGetTLSObjects to get secAlias<br>
> == NULL, solely because all the callers (direct or indirect) of this method call<br>
<br>
</span>Oh, I see, this is supposed to be a follow-up patch to<br>
<a href="https://www.redhat.com/archives/libvir-list/2017-September/msg00645.html" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>archives/libvir-list/2017-<wbr>September/msg00645.html</a>.<br>
You can disregard my comment above then, the fix still needs to be adjusted<br>
though as pointed out in my previous response.<br>
<br>
Erik<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div><br></div><div>Thanks for pointing out my blunder! I just realized that I had not restarted libvirtd service after running "make install" when I tested my change. The changes appeared to work because I had the original fix described in <a href="https://www.redhat.com/archives/libvir-list/2017-September/msg00638.html">https://www.redhat.com/archives/libvir-list/2017-September/msg00638.html</a> still in libvirtd.</div><div><br></div><div>I will repost after fixing and testing again.</div><div><br></div><div>Ashish</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
> it as &secAlias. Therefore, I think the case you're trying to fix cannot<br>
> happen in the current state - the fix is also wrong, see below.<br>
><br>
><br>
> ><br>
> >      if (qemuBuildTLSx509BackendProps(<wbr>tlsCertdir, tlsListen, tlsVerify,<br>
> > -                                     *secAlias, qemuCaps, tlsProps) < 0)<br>
> > +                                     **secAlias ? *secAlias : NULL, qemuCaps,<br>
><br>
> So, hypothetically, if secAlias == NULL and *secAlias results in a SEGFAULT,<br>
> what is the result of doing **secAlias? Correct, a SEGFAULT.<br>
><br>
> Erik<br>
><br>
</div></div><span class="gmail-HOEnZb"><font color="#888888">> --<br>
> libvir-list mailing list<br>
> <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/libvir-list" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/libvir-list</a><br>
</font></span></blockquote></div><br></div></div>