mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 01:52:34 +00:00
Merge pull request #3934 from brauner/2021-08-12.fixes
cgroups: cpumask fixes
This commit is contained in:
commit
fb40641cac
@ -215,7 +215,7 @@ static uint32_t *lxc_cpumask(char *buf, size_t nbits)
|
|||||||
size_t arrlen;
|
size_t arrlen;
|
||||||
|
|
||||||
arrlen = BITS_TO_LONGS(nbits);
|
arrlen = BITS_TO_LONGS(nbits);
|
||||||
bitarr = calloc(arrlen, sizeof(uint32_t));
|
bitarr = zalloc(arrlen * sizeof(uint32_t));
|
||||||
if (!bitarr)
|
if (!bitarr)
|
||||||
return ret_set_errno(NULL, ENOMEM);
|
return ret_set_errno(NULL, ENOMEM);
|
||||||
|
|
||||||
@ -596,7 +596,6 @@ static bool cpuset1_cpus_initialize(int dfd_parent, int dfd_child,
|
|||||||
|
|
||||||
if (maxposs < maxisol)
|
if (maxposs < maxisol)
|
||||||
maxposs = maxisol;
|
maxposs = maxisol;
|
||||||
maxposs++;
|
|
||||||
} else {
|
} else {
|
||||||
TRACE("The path \""__ISOL_CPUS"\" to read isolated cpus from does not exist");
|
TRACE("The path \""__ISOL_CPUS"\" to read isolated cpus from does not exist");
|
||||||
}
|
}
|
||||||
@ -615,7 +614,6 @@ static bool cpuset1_cpus_initialize(int dfd_parent, int dfd_child,
|
|||||||
|
|
||||||
if (maxposs < maxoffline)
|
if (maxposs < maxoffline)
|
||||||
maxposs = maxoffline;
|
maxposs = maxoffline;
|
||||||
maxposs++;
|
|
||||||
} else {
|
} else {
|
||||||
TRACE("The path \""__OFFLINE_CPUS"\" to read offline cpus from does not exist");
|
TRACE("The path \""__OFFLINE_CPUS"\" to read offline cpus from does not exist");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user