x86/vLAPIC: don't leak regs page from vlapic_init() upon error

Fixes: 8a981e0bf2 ("Make map_domain_page_global fail")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 8a62dee9ce
master date: 2020-10-09 17:20:11 +0100
This commit is contained in:
Jan Beulich committed 2020-10-20 14:55:39 +02:00
1 parent fa9e1f73bf
commit c32e9be04a
1 file changed
+1
+1
View File
@@ -1626,6 +1626,7 @@ int vlapic_init(struct vcpu *v)
vlapic->regs = __map_domain_page_global(vlapic->regs_page);
if ( vlapic->regs == NULL )
{
free_domheap_page(vlapic->regs_page);
dprintk(XENLOG_ERR, "map vlapic regs error: %d/%d\n",
v->domain->domain_id, v->vcpu_id);
return -ENOMEM;
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.