Xiao Long Jiang <address@hidden> writes:
This fixes a Qemu crash that introduced by commit ad73970
("qom: Wrap prop visit in visit_start_struct").
Not all of the callers of user_creatable_add_type always pass qdict,
so we should check qdict against NULL, but not raise an assertion.
The problem can be easily triggered by adding an iothread with:
$ virsh iothreadadd <domain> <threadid>
In which the <threadid> is newly defined. The result of the command
will return an error and cause the running guest crash.
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: Xiao Long Jiang <address@hidden>
Reviewed-by: Dong Jia Shi <address@hidden>
Marc-André already posted a simpler fix:
Subject: [PATCH] qmp: fix object-add assert() without props
Message-Id: <address@hidden>
Would you be willing to test it? Review would of course also be
appreciated.
Thanks!