io: fix mem leak when using QIOTask in TLS and websock channels
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | io: separate freeing of tasks from marking them as completeinclude/ io/ io/ +2 more | +60 | 1 reply | |
| 2/3 | io: fix cleanup for TLS I/O source data on cancellationio/ | +40 | 1 reply | |
| 3/3 | io: fix cleanup for websock I/O source data on cancellationio/ | +1 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Marc-André Lureau |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] io: fix mem leak when using QIOTask in TLS and websock channels
The handshake functions in the TLS and websock channels could leak a QIOTask and some related data if the underlying channel was torn down before the handshake completed. This also applies to the async TLS "bye" tasks.
Fixing this required refactoring the QIOTask cleanup paradigm slightly.
This is a followup to a proposed fix at
https://lists.nongnu.org/archive/html/qemu-devel/2025-09/msg02984.html
and also reported at
https://gitlab.com/qemu-project/qemu/-/issues/3114
Daniel P. Berrangé (3):
io: separate freeing of tasks from marking them as complete
io: fix cleanup for TLS I/O source data on cancellation
io: fix cleanup for websock I/O source data on cancellation
include/io/task.h | 29 +++++++++++++------ io/channel-tls.c | 60 ++++++++++++++++++++++++++------------- io/channel-websock.c | 2 +- io/task.c | 8 ++++-- tests/unit/test-io-task.c | 26 +++++++++++++++++ 5 files changed, 94 insertions(+), 31 deletions(-)
Signature · 1 line
2.52.0