Re: [PATCH] Avoid async signal safety problem in glibc's setxid

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

 



On 11/15/2013 09:20 AM, Daniel P. Berrange wrote:
> The glibc setxid is supposed to be async signal safe, but
> libc developers confirm that it is not. This causes a problem
> when libvirt_lxc starts the FUSE thread and then runs clone()
> to start the container. If the clone() was done before the
> FUSE thread has completely started up, then the container
> will hang in setxid after clone().
> 
> The fix is to avoid creating any threads until after the
> container has been clone()'d. By avoiding any threads in
> the parent, the child is no longer required to run in an
> async signal safe context, and we thus avoid the glibc
> bug.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/lxc/lxc_controller.c | 11 +++++++++--
>  src/lxc/lxc_fuse.c       | 21 +++++++++++++++------
>  src/lxc/lxc_fuse.h       |  1 +
>  3 files changed, 25 insertions(+), 8 deletions(-)

I can review the code, but I'd feel better if this also got field
testing as resolving the problem before you push it.

ACK.

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