Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
xen
5b76b780-rangeset-inquiry-functions-tolerate-NU...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5b76b780-rangeset-inquiry-functions-tolerate-NULL.patch of Package xen
# Commit ad0a9f273d6d6f0545cd9b708b2d4be581a6cadd # Date 2018-08-17 13:54:40 +0200 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> rangeset: make inquiry functions tolerate NULL inputs Rather than special casing the ->iomem_caps check in x86's get_page_from_l1e() for the dom_xen case, let's be more tolerant in general, along the lines of rangeset_is_empty(): A never allocated rangeset can't possibly contain or overlap any range. Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> --- a/xen/common/rangeset.c +++ b/xen/common/rangeset.c @@ -235,6 +235,9 @@ int rangeset_contains_range( ASSERT(s <= e); + if ( !r ) + return 0; + spin_lock(&r->lock); x = find_range(r, s); contains = (x && (x->e >= e)); @@ -251,6 +254,9 @@ int rangeset_overlaps_range( ASSERT(s <= e); + if ( !r ) + return 0; + spin_lock(&r->lock); x = find_range(r, e); overlaps = (x && (s <= x->e));
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