Re: [libvirt PATCHv6 1/1] add DHCP snooping

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

 



Stefan Berger/Watson/IBM wrote on 03/22/2012 03:04:53 PM:

> 
> I have some concerns about the cancelation of the thread. It can 
> hold the snoop lock and get cancelled while holding it. Next time 
> that lock is grabbed we will get a deadlock...
>

The snoop lock is acquired in virNWFilterDHCPSnoopEnd(), which
is where the pthread_cancel() directly (for valid leases) or the
freeReq()/pthread_cancel() is done. So, the canceler has the lock
and the canceling thread can't have it, then.

The only other case I see is when the config goes invalid and
we exit the snooper loop; he frees the snoop_lock() before removing
his own hash entry,  which will cancel the same thread doing
the remove. Again, it can't have the snoop lock when canceled.

Is there some other case you think I'm missing?

                                        +-DLS

--
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]