[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/ioreq: drop the emulator reference when range set allocation fails
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxx>
- Date: Tue, 29 Sep 2026 18:08:35 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3HaPFovSO4rhmgsWBhUS5lmdIuhgckoiwCbP7wlhJyY=; b=JXWFcoQO2eWc7y8ujlWau2joEenQpo8hvHMGBehci3/rZOt+Qifx2SpeMSjEvxxDVq2LOy1YwpIDE6DIyxsP+A7P9WpJMkgJzEYZNbRHbZeTm1uBLu4wLsoH0wRKG9wHT9RuH3AmEDMZDjZuSNHczdUxJod38c+5KPCbgP3BuSUTp+I/0fgBJr0vTU80dQMg0g5cM0KvD9Y04/MouKUD7Qi/tiO4VpoWdC9SnUeIUa0RRnfkRQr36DI9J/421tutsy/mrCI7zVl8aHBQyBi7ieBGay0ksY/bJ2F2pfRr6urPuy+IJFvVC1+AAfKisBz9kgfyxvb4O2iIkapdiA84UQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DCovPEMTXuAq2EufMaMqpBJ+rHNA2+qR88GJ/cC34MAaQN1NkdDBxjnq9z7Oxe22MCqnm/6K5A1qslIcThKORqo8xPQBPIY3bYnvYda88LRDcCiCAaLL4GLbLzmtoVr9KwNh8Kc+YU4delljkGL6IVkHHQfYtfCTF/BJA231jS39w5vapn4gElCt0Beo+VAEbHpIQD/HNt06iT6iAmoS2UmuL/vXzm/wMzGBxCa+s8AjRd7P39GHNoYfBdrmpA1R29+Rq5lF+0/nN7dH+BGwFSoC7pQpd6r40t3L7GuQT36O/b4pZf5uYU5YExvDZnq7u+rSqte76xiudqkJpOkOxQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Delivery-date: Tue, 29 Sep 2026 17:08:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
ioreq_server_init() takes a reference on the emulating domain before
allocating the server's range sets, but does not release it when that
allocation fails. The leaked reference prevents the emulating domain
from ever being fully destroyed.
Route this failure through the existing put_domain() cleanup.
Fixes: ccb42e0ca661 ("x86/hvm: take a reference on ioreq server emulating
domain")
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxx>
---
xen/common/ioreq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c
index f5fd30ce12..4b321a5c61 100644
--- a/xen/common/ioreq.c
+++ b/xen/common/ioreq.c
@@ -595,7 +595,7 @@ static int ioreq_server_init(struct ioreq_server *s,
rc = ioreq_server_alloc_rangesets(s, id);
if ( rc )
- return rc;
+ goto fail_rangesets;
s->bufioreq_handling = bufioreq_handling;
@@ -614,6 +614,7 @@ static int ioreq_server_init(struct ioreq_server *s,
ioreq_server_free_rangesets(s);
+ fail_rangesets:
put_domain(s->emulator);
return rc;
}
base-commit: 24bd190cd99447ec634da6cb56590ccf44ad627d
--
2.47.3
|