Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qemu/qemu
base: 044f8cf70a2f
Choose a base ref
...
head repository: qemu/qemu
compare: 1488ccb9b64e
Choose a head ref
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on May 3, 2023

  1. systemd: Also clear LISTEN_FDNAMES during systemd socket activation

    Some time after systemd documented LISTEN_PID and LISTEN_FDS for
    socket activation, they later added LISTEN_FDNAMES; now documented at:
    https://www.freedesktop.org/software/systemd/man/sd_listen_fds.html
    
    In particular, look at the implementation of sd_listen_fds_with_names():
    https://github.com/systemd/systemd/blob/main/src/libsystemd/sd-daemon/sd-daemon.c
    
    If we ever pass LISTEN_PID=xxx and LISTEN_FDS=n to a child process,
    but leave LISTEN_FDNAMES=... unchanged as inherited from our parent
    process, then our child process using sd_listen_fds_with_names() might
    see a mismatch in the number of names (unexpected -EINVAL failure), or
    even if the number of names matches the values of those names may be
    unexpected (with even less predictable results).
    
    Usually, this is not an issue - the point of LISTEN_PID is to tell
    systemd socket activation to ignore all other LISTEN_* if they were
    not directed to this particular pid.  But if we end up consuming a
    socket directed to this qemu process, and later decide to spawn a
    child process that also needs systemd socket activation, we must
    ensure we are not leaking any stale systemd variables through to that
    child.  The easiest way to do this is to wipe ALL LISTEN_* variables
    at the time we consume a socket, even if we do not yet care about a
    LISTEN_FDNAMES passed in from the parent process.
    
    See also https://lists.freedesktop.org/archives/systemd-devel/2023-March/048920.html
    
    Thanks: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Eric Blake <eblake@redhat.com>
    Message-Id: <20230324153349.1123774-1-eblake@redhat.com>
    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
    ebblake committed May 3, 2023
    Copy the full SHA
    7ade2b1 View commit details
    Browse the repository at this point in the history
  2. block/export: call blk_set_dev_ops(blk, NULL, NULL)

    Most export types install BlockDeviceOps pointers. It is easy to forget
    to remove them because that happens automatically via the "drive" qdev
    property in hw/ but not block/export/.
    
    Put blk_set_dev_ops(blk, NULL, NULL) calls in the core export.c code so
    the export types don't need to remember.
    
    This fixes the nbd and vhost-user-blk export types.
    
    Fixes: fd6afc5 ("nbd/server: Use drained block ops to quiesce the server")
    Fixes: ca858a5 ("vhost-user-blk-server: notify client about disk resize")
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Message-Id: <20230502211119.720647-1-stefanha@redhat.com>
    Signed-off-by: Eric Blake <eblake@redhat.com>
    Stefan Hajnoczi authored and ebblake committed May 3, 2023
    Copy the full SHA
    de79b52 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Merge tag 'pull-nbd-2023-05-03' of https://repo.or.cz/qemu/ericb into…

    … staging
    
    nbd patches for 2023-05-03
    
    - Eric Blake: clear LISTEN_FDNAMES when consuming systemd sockets
    - Stefan Hajnoczi: clear export BlockDeviceOps in central location
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmRSr2gACgkQp6FrSiUn
    # Q2qGIQf/Yg7Qwplxz9U+1VZ2sLwMU4NukzeYQFb5K3cdJUz0UzcZW7EZ4eL5Ll1F
    # g6UUni+1y+xnTnN+isz062uSo05WCOoLdV0MKYPWjILqe2HpqYLK7Kt2Y8Syh/ET
    # aiGoFl2T510A3M8QTNrQIGnul7g3JBRR1ar3mm7u5SD9gKxjlRFftEQLU8GrAEZP
    # Bms122pN8Cvu/vRnBraeReNcTwdtWSQYtOvg2BHL+gROWcmS+FAtSpPOjXgjSSTa
    # /K5QgBoph5I4H9sJVpN/nbi5aJkhm/A559tv/VR7SP862u6qz3n+2rJSoxee5S7x
    # FgxJ/o03ZeTVFfIE3LdVycvOokPMJw==
    # =DNEY
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Wed 03 May 2023 08:00:56 PM BST
    # gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
    # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
    # gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
    # gpg:                 aka "[jpeg image of size 6874]" [full]
    
    * tag 'pull-nbd-2023-05-03' of https://repo.or.cz/qemu/ericb:
      block/export: call blk_set_dev_ops(blk, NULL, NULL)
      systemd: Also clear LISTEN_FDNAMES during systemd socket activation
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed May 4, 2023
    Copy the full SHA
    1488ccb View commit details
    Browse the repository at this point in the history