Re: [PATCH] util: eventpoll: Survive EBADF on macOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 22, 2018 at 10:41:18AM +0100, Daniel P. Berrangé wrote:
> I don't think we should go through the dispatch code when
> we get EBADF, as the contents of the 'revents' fields are
> undefined after we get an error.
> 
> We should jump straight to the end where we have
> "eventLoop.running = 0;"
> 
> If any FDs were in fact ready, we'll get them on the next iteration of
> the loop anyway.
> 

Alright, but the thread won't hold evenLoop.lock after such jump and
virMutexUnlock may fail with ENOPERM. I suppose that could confuse
valgrind & friends.
What if we change eventLoop.running to 0 under the eventLoop.lock right in
the macOS EBADF handler and then return?

--
Roman

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux