Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
xen.7653
5548e903-domctl-don-t-truncate-XEN_DOMCTL_max_m...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5548e903-domctl-don-t-truncate-XEN_DOMCTL_max_mem-requests.patch of Package xen.7653
# Commit 017e667c433a1040306db6265b05e104568c70c8 # Date 2015-05-05 18:00:03 +0200 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> domctl: don't truncate XEN_DOMCTL_max_mem requests Instead saturate the value if the input can't be represented in the respective struct domain field. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Index: xen-4.5.5-testing/xen/common/domctl.c =================================================================== --- xen-4.5.5-testing.orig/xen/common/domctl.c +++ xen-4.5.5-testing/xen/common/domctl.c @@ -895,7 +895,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe case XEN_DOMCTL_max_mem: { - unsigned long new_max; + uint64_t new_max; ret = -EINVAL; new_max = op->u.max_mem.max_memkb >> (PAGE_SHIFT-10); @@ -906,7 +906,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe * that the domain will now be allowed to "ratchet" down to new_max. In * the meantime, while tot > max, all new allocations are disallowed. */ - d->max_pages = new_max; + d->max_pages = min(new_max, (uint64_t)(typeof(d->max_pages))-1); ret = 0; spin_unlock(&d->page_alloc_lock); }
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