projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a74c06
)
jail: cgroups: fix uninitialized variable
author
Daniel Golle
<daniel@makrotopia.org>
Thu, 28 Jan 2021 23:46:16 +0000
(23:46 +0000)
committer
Daniel Golle
<daniel@makrotopia.org>
Tue, 2 Feb 2021 12:54:00 +0000
(12:54 +0000)
Make sure 'limit' is initialized to -1 (==max) when translating
cgroups-1 memory controller spec to cgroups-2.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/cgroups.c
patch
|
blob
|
history
diff --git
a/jail/cgroups.c
b/jail/cgroups.c
index fc2bbebcf9c129076c2020e87102f22d71d44bf8..68bd189723ae32686555bcce2a9c87180f7a3382 100644
(file)
--- a/
jail/cgroups.c
+++ b/
jail/cgroups.c
@@
-644,7
+644,7
@@
static int parseOCIlinuxcgroups_legacy_memory(struct blob_attr *msg)
{
struct blob_attr *tb[__OCI_LINUX_CGROUPS_MEMORY_MAX];
char tmp[32] = { 0 };
- int64_t limit, swap, reservation;
+ int64_t limit
= -1
, swap, reservation;
blobmsg_parse(oci_linux_cgroups_memory_policy, __OCI_LINUX_CGROUPS_MEMORY_MAX, tb, blobmsg_data(msg), blobmsg_len(msg));