[libvirt] [PATCH] conf: fix crash when hotplug a channel chr device with no target

Ján Tomko jtomko at redhat.com
Tue Jan 13 09:34:49 UTC 2015

On 01/13/2015 09:41 AM, Luyao Huang wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1181408
> when we try to hotplug a channel chr device with no target, we
> will get success(which should fail) in virDomainChrDefParseXML,
> because we use goto cleanup this place and return def.then cause
> a big problem in virDomainChrEquals(touch a shouldn't happend place).

The problem is that ChrEquals matches according to the target name, so after
we add the device to the domain definition, we cannot remove it after failure,
leaving a stale pointer there.

> Signed-off-by: Luyao Huang <lhuang at redhat.com>
> ---
>  src/conf/domain_conf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


I have added the explanation to the commit message and pushed the patch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150113/7810bbf5/attachment-0001.sig>

More information about the libvir-list mailing list