Re: [PATCH 14/14] hw/i386/vmport: Assert vmport initialized before registering commands

2020-03-10 Thread Liran Alon
On 10/03/2020 11:30, Michael S. Tsirkin wrote: On Tue, Mar 10, 2020 at 01:54:11AM +0200, Liran Alon wrote: vmport_register() is also called from other modules such as vmmouse. Therefore, these modules rely that vmport is realized before those call sites. If this is violated, vmport_register()

Re: [PATCH 14/14] hw/i386/vmport: Assert vmport initialized before registering commands

2020-03-10 Thread Michael S. Tsirkin
On Tue, Mar 10, 2020 at 01:54:11AM +0200, Liran Alon wrote: > vmport_register() is also called from other modules such as vmmouse. > Therefore, these modules rely that vmport is realized before those call > sites. If this is violated, vmport_register() will NULL-deref. > > To make such issues

[PATCH 14/14] hw/i386/vmport: Assert vmport initialized before registering commands

2020-03-09 Thread Liran Alon
vmport_register() is also called from other modules such as vmmouse. Therefore, these modules rely that vmport is realized before those call sites. If this is violated, vmport_register() will NULL-deref. To make such issues easier to debug, assert in vmport_register() that vmport is already