Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP1
xen.20938
xsa317.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xsa317.patch of Package xen.20938
From aeb46e92f915f19a61d5a8a1f4b696793f64e6fb Mon Sep 17 00:00:00 2001 From: Julien Grall <jgrall@amazon.com> Date: Thu, 19 Mar 2020 13:17:31 +0000 Subject: [PATCH] xen/common: event_channel: Don't ignore error in get_free_port() Currently, get_free_port() is assuming that the port has been allocated when evtchn_allocate_port() is not return -EBUSY. However, the function may return an error when: - We exhausted all the event channels. This can happen if the limit configured by the administrator for the guest ('max_event_channels' in xl cfg) is higher than the ABI used by the guest. For instance, if the guest is using 2L, the limit should not be higher than 4095. - We cannot allocate memory (e.g Xen has not more memory). Users of get_free_port() (such as EVTCHNOP_alloc_unbound) will validly assuming the port was valid and will next call evtchn_from_port(). This will result to a crash as the memory backing the event channel structure is not present. Fixes: 368ae9a05fe ("xen/pvshim: forward evtchn ops between L0 Xen and L2 DomU") Signed-off-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> --- xen/common/event_channel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- xen-4.10.4-testing.orig/xen/common/event_channel.c +++ xen-4.10.4-testing/xen/common/event_channel.c @@ -202,10 +202,10 @@ static int get_free_port(struct domain * { int rc = evtchn_allocate_port(d, port); - if ( rc == -EBUSY ) - continue; - - return port; + if ( rc == 0 ) + return port; + else if ( rc != -EBUSY ) + return rc; } return -ENOSPC;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor