Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP1:GA
systemd-mini.17931
0015-cgroup-Parse-infinity-properly-for-memory-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0015-cgroup-Parse-infinity-properly-for-memory-protection.patch of Package systemd-mini.17931
From aacbbb51c5991f06934ee6029146007fb802a26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com> Date: Thu, 9 Jul 2020 19:28:15 +0200 Subject: [PATCH 15/15] cgroup: Parse infinity properly for memory protections This fixes commit db2b8d2e2895010f3443a589c9c1f1dfb25256a6 that rectified parsing empty values but broke parsing explicit infinity. Intended parsing semantics will be captured in a testcase in a follow up commit. Ref: #16248 (cherry picked from commit 67e2baff6be8052f48dfdb2258fb68d63c95fe01) [mkoutny: fixes bsc#1167471] [mkoutny: dropped parts for MemoryMin,DefaultMemory{Min,Low}] --- src/core/load-fragment.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index dea1f10c69..a5e1b0eec9 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -3043,10 +3043,9 @@ int config_parse_memory_limit( uint64_t bytes = CGROUP_LIMIT_MAX; int r; - if (STR_IN_SET(lvalue, "MemoryLow")) + if (isempty(rvalue) && STR_IN_SET(lvalue, "MemoryLow")) bytes = CGROUP_LIMIT_MIN; - - if (!isempty(rvalue) && !streq(rvalue, "infinity")) { + else if (!isempty(rvalue) && !streq(rvalue, "infinity")) { r = parse_percent(rvalue); if (r < 0) { -- 2.26.2
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