On Fri, Feb 11, 2022 at 11:30:39AM +0100, Tim Wiederhake wrote: > If the mutex is part of the `driver` object, it cannot guard that > object's creation and destruction perfectly. The mutex doesn't need to guard the object's creation/destruction in its entirity though. The driver creation/destruction is a onetime thing at startup and shutdown of the daemon. There is a requirement that API calls have ceased before destruction begins, and if that's not the case then the code is unsafe no matter what because it will be liable to access a NULL driver object after acquiring the mutex. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|