diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-05-04 07:38:10 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-04 07:38:10 +0100 |
commit | 1488ccb9b64e76aab0843bc035ce3b1938df2517 (patch) | |
tree | e33b560b4c1e571757021af81a5f3af46775c834 | |
parent | 044f8cf70a2fdf3b9e4c4d849c66e7855d2c446a (diff) | |
parent | de79b52604e43fdeba6cee4f5af600b62169f2d2 (diff) |
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>
-rw-r--r-- | block/export/export.c | 2 | ||||
-rw-r--r-- | block/export/vduse-blk.c | 1 | ||||
-rw-r--r-- | util/systemd.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/block/export/export.c b/block/export/export.c index e3fee60611..62c7c22d45 100644 --- a/block/export/export.c +++ b/block/export/export.c @@ -192,6 +192,7 @@ BlockExport *blk_exp_add(BlockExportOptions *export, Error **errp) return exp; fail: + blk_set_dev_ops(exp->blk, NULL, NULL); blk_unref(blk); aio_context_release(ctx); if (exp) { @@ -219,6 +220,7 @@ static void blk_exp_delete_bh(void *opaque) assert(exp->refcount == 0); QLIST_REMOVE(exp, next); exp->drv->delete(exp); + blk_set_dev_ops(exp->blk, NULL, NULL); blk_unref(exp->blk); qapi_event_send_block_export_deleted(exp->id); g_free(exp->id); diff --git a/block/export/vduse-blk.c b/block/export/vduse-blk.c index f7ae44e3ce..b53ef39da0 100644 --- a/block/export/vduse-blk.c +++ b/block/export/vduse-blk.c @@ -346,7 +346,6 @@ static void vduse_blk_exp_delete(BlockExport *exp) blk_remove_aio_context_notifier(exp->blk, blk_aio_attached, blk_aio_detach, vblk_exp); - blk_set_dev_ops(exp->blk, NULL, NULL); ret = vduse_dev_destroy(vblk_exp->dev); if (ret != -EBUSY) { unlink(vblk_exp->recon_file); diff --git a/util/systemd.c b/util/systemd.c index 5bcac9b401..ced518f771 100644 --- a/util/systemd.c +++ b/util/systemd.c @@ -51,6 +51,7 @@ unsigned int check_socket_activation(void) /* So these are not passed to any child processes we might start. */ unsetenv("LISTEN_FDS"); unsetenv("LISTEN_PID"); + unsetenv("LISTEN_FDNAMES"); /* So the file descriptors don't leak into child processes. */ for (i = 0; i < nr_fds; ++i) { |