Ensure error handling callback functions are called from safe context
The virRaiseErrorFull() may invoke the error handler callback functions an application has registered. This is not good because the connection object may not be available at this point, and the caller may be holding locks. This creates a problem if the error handler calls back into libvirt. The solutuon is to move invocation of the handler into the final cleanup code in the public API entry points, where it is guarenteed to have safe state. * src/libvirt.c: Invoke virDispatchError() in all error paths * src/util/virterror.c: Remove virSetConnError/virSetGlobalError, replacing with virDispatchError(). Move invocation of the error callbacks into virDispatchError() instead of the virRaiseErrorFull function which is not in a safe context
Showing
此差异已折叠。
想要评论请 注册 或 登录