Re: [PATCH] virNetClientSetTLSSession: Restore original signal mask

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

 



On 03/19/2014 11:42 AM, Eric Blake wrote:
> On 03/19/2014 11:29 AM, Michal Privoznik wrote:
>> Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling
>> poll(). This is okay, as we don't want poll() to be interrupted.
>> However, then - immediately as we fall out from the poll() - we try to
>> restore the original sigmask - again using SIG_BLOCK. But as the man
>> page says, SIG_BLOCK adds signals to the signal mask:
>>
>> SIG_BLOCK
>>       The set of blocked signals is the union of the current set and the set argument.
>>
>> Therefore, when restoring the original mask, we need to completely
>> overwrite the one we set earlier and hence we should be using:
>>
>> SIG_SETMASK
>>       The set of blocked signals is set to the argument set.
>>
>> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
>> ---
>>
>> Notes:
>>     This is a very old bug. It's worth backporting onto all maint branches we have.
>>
>>  src/rpc/virnetclient.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> ACK.  And yes, it needs to be backported.

Now done to all the active -maint branches.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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