qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qemu-ga: obey LISTEN_PID when using systemd soc


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: obey LISTEN_PID when using systemd socket activation
Date: Thu, 16 Mar 2017 17:01:02 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Thu, Mar 16, 2017 at 05:34:30PM +0100, Paolo Bonzini wrote:
> 
> 
> On 16/03/2017 17:19, Daniel P. Berrange wrote:
> > On Thu, Mar 16, 2017 at 05:15:35PM +0100, Paolo Bonzini wrote:
> >> qemu-ga's socket activation support was not obeying the LISTEN_PID
> >> environment variable, which avoids that a process uses a socket-activation
> >> file descriptor meant for its parent.
> >>
> >> Mess can for example ensue if a process forks a children before consuming
> >> the socket-activation file descriptor and therefore setting O_CLOEXEC
> >> on it.
> >>
> >> Luckily, qemu-nbd also got socket activation code, and its copy does
> >> support LISTEN_PID.  Some extra fixups are needed to ensure that the
> >> code can be used for both, but that's what this patch does.  The
> >> main change is to replace get_listen_fds's "consume" argument with
> >> the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code.
> >>
> >> Cc: "Richard W.M. Jones" <address@hidden>
> >> Cc: Stefan Hajnoczi <address@hidden>
> >> Signed-off-by: Paolo Bonzini <address@hidden>
> >> ---
> >>  include/qemu/systemd.h |  26 +++++++++++++
> >>  qemu-nbd.c             | 100 
> >> ++++---------------------------------------------
> >>  qga/main.c             |  51 +++++++------------------
> >>  util/Makefile.objs     |   1 +
> >>  util/systemd.c         |  77 +++++++++++++++++++++++++++++++++++++
> > 
> > A MAINTAINERS file entry for these new files ?
> 
> No idea of who would be a candidate.

The person who creates the file ;-P

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]