xen/ioreq: drop the emulator reference when range set allocation fails

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: ccb42e0ca6 ("x86/hvm: take a reference on ioreq server emulating domain")
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Mykola Kvach <mykola_kvach@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Edgar E. Iglesias authored and Jan Beulich committed 2026-10-01 09:59:28 +02:00
1 parent ccf9d78c82
commit 383aa8f617
1 file changed
+2 -1
+2 -1
View File
@@ -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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.