[PATCH v2 2/3] nodedev: Mark device initialization complete even in case of an error

Erik Skultety eskultet at redhat.com
Wed Apr 14 05:53:38 UTC 2021


On Tue, Apr 13, 2021 at 05:57:14PM +0200, Michal Privoznik wrote:
> To speed up nodedev driver initialization, the device enumeration
> is done in a separate thread. Once finished, the thread sets a
> boolean variable that allows public APIs to be called (instead of
> waiting for the thread to finish).
> 
> However, if there's an error in the device enumeration thread
> then the control jumps over at the 'error' label and the boolean
> is never set. This means, that any virNodeDev*() API is stuck
> forever. Mark the initialization as complete (the thread is
> quitting anyway) and let the APIs proceed.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet at redhat.com>




More information about the libvir-list mailing list