[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 0b054b: block/blkio: close the fd when blkio_
From: |
Richard Henderson |
Subject: |
[Qemu-commits] [qemu/qemu] 0b054b: block/blkio: close the fd when blkio_connect() fails |
Date: |
Thu, 03 Aug 2023 09:27:56 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 0b054b4c82ebad6e90111e3ffa3514f841dbb1d0
https://github.com/qemu/qemu/commit/0b054b4c82ebad6e90111e3ffa3514f841dbb1d0
Author: Stefano Garzarella <sgarzare@redhat.com>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M block/blkio.c
Log Message:
-----------
block/blkio: close the fd when blkio_connect() fails
libblkio drivers take ownership of `fd` only after a successful
blkio_connect(), so if it fails, we are still the owners.
Fixes: cad2ccc395 ("block/blkio: use qemu_open() to support fd passing for
virtio-blk")
Suggested-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Message-id: 20230803082825.25293-2-sgarzare@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 9b06d0d076271d76e5384d767ef94a676f0a9efd
https://github.com/qemu/qemu/commit/9b06d0d076271d76e5384d767ef94a676f0a9efd
Author: Stefano Garzarella <sgarzare@redhat.com>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M block/blkio.c
Log Message:
-----------
block/blkio: add more comments on the fd passing handling
As Hanna pointed out, it is not clear in the code why qemu_open()
can fail, and why blkio_set_int("fd") is not enough to discover
the `fd` property support.
Let's fix them by adding more details in the code comments.
Suggested-by: Hanna Czenczek <hreitz@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20230803082825.25293-3-sgarzare@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 2e6a56f6fb9f6b3c9e9eeffe7fb306584e605103
https://github.com/qemu/qemu/commit/2e6a56f6fb9f6b3c9e9eeffe7fb306584e605103
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M block/blkio.c
Log Message:
-----------
Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into
staging
Pull request
Fix for an fd leak in the blkio block driver.
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmTLzf0ACgkQnKSrs4Gr
# c8hoGQf+KjsuChyk8/aoDP4MMkNB1/X3nsazCd3GY3uE+DRK8ieiRJeT6chMIey/
# sK3v/drkDmdjj30qbXGxjLVa5SNsP9N6pVoo8fnFJN7LmGBE/JLEYUYVNpHAKEzb
# N7mgDBcTHZWKGwZsh109X5l3Cr6HR484m3qKI/49qlVuWJmp8/lDUbFJbp96I6g9
# ki9W0itwOrdtebYyUDml8eE/yLOxOTWx5Q7Q+qwSiEUNCwyd7yOS1QHQbnCgKw3m
# c0Qzch2Z3dT61YbMrF6j0H7M1dXXcbNFdYVeMHYYJRkeN+bz4fWcUC4HkrL6YWf5
# GLIj5irTSnae4TevlYVZT+72v99QQQ==
# =pQ96
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 03 Aug 2023 08:55:41 AM PDT
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
* tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
block/blkio: add more comments on the fd passing handling
block/blkio: close the fd when blkio_connect() fails
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Compare: https://github.com/qemu/qemu/compare/c167c80b4637...2e6a56f6fb9f
- [Qemu-commits] [qemu/qemu] 0b054b: block/blkio: close the fd when blkio_connect() fails,
Richard Henderson <=