[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.1.1 22/32] migration/multifd: Fix p->iov leak in multifd-uadk.
From: |
Michael Tokarev |
Subject: |
[Stable-9.1.1 22/32] migration/multifd: Fix p->iov leak in multifd-uadk.c |
Date: |
Mon, 7 Oct 2024 22:16:39 +0300 |
From: Fabiano Rosas <farosas@suse.de>
The send_cleanup() hook should free the p->iov that was allocated at
send_setup(). This was missed because the UADK code is conditional on
the presence of the accelerator, so it's not tested by default.
Fixes: 819dd20636 ("migration/multifd: Add UADK initialization")
Reported-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
(cherry picked from commit 405e352d28c24991cacfdebccf67d56c4795cf6e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c
index d12353fb21..9a582fc919 100644
--- a/migration/multifd-uadk.c
+++ b/migration/multifd-uadk.c
@@ -146,6 +146,8 @@ static void multifd_uadk_send_cleanup(MultiFDSendParams *p,
Error **errp)
multifd_uadk_uninit_sess(wd);
p->compress_data = NULL;
+ g_free(p->iov);
+ p->iov = NULL;
}
static inline void prepare_next_iov(MultiFDSendParams *p, void *base,
--
2.39.5
- [Stable-9.1.1 16/32] mac_dbdma: Remove leftover `dma_memory_unmap` calls, (continued)
- [Stable-9.1.1 16/32] mac_dbdma: Remove leftover `dma_memory_unmap` calls, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 17/32] migration/multifd: Fix rb->receivedmap cleanup race, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 18/32] hw/char/stm32l4x5_usart.c: Enable USART ACK bit response, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 19/32] target/arm: Correct ID_AA64ISAR1_EL1 value for neoverse-v1, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 20/32] target/hppa: Fix random 32-bit linux-user crashes, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 26/32] hw/mips/jazz: fix typo in in-built NIC alias, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 25/32] target/ppc: Fix lxvx/stxvx facility check, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 30/32] hw/sd/sdcard: Fix handling of disabled boot partitions, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 21/32] target/ppc: Fix migration of CPUs with TLB_EMB TLB type, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 23/32] hw/loongarch/virt: Add description for virt machine type, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 22/32] migration/multifd: Fix p->iov leak in multifd-uadk.c,
Michael Tokarev <=
- [Stable-9.1.1 32/32] vnc: fix crash when no console attached, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 31/32] testing: bump mips64el cross to bookworm and fix package list, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 27/32] util/timer: avoid deadlock when shutting down, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 29/32] target/arm: Avoid target_ulong for physical address lookups, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 28/32] block/reqlist: allow adding overlapping requests, Michael Tokarev, 2024/10/07
- [Stable-9.1.1 24/32] tcg: Fix iteration step in 32-bit gvec operation, Michael Tokarev, 2024/10/07