The changes to libcgroup are available here:
https://github.com/drakenclimber/libcgroup/tree/issues/21
The changes to the libcgroup tests are available here:
https://github.com/drakenclimber/libcgroup-tests/tree/issues/21
Automated test results are available here:
https://github.com/drakenclimber/libcgroup/runs/1964826422
Code coverage remained effectively the same at 31.5%:
https://coveralls.io/builds/37386448
On 2/23/21 2:15 PM, Tom Hromatka wrote:
Ignore the positive length returned by asprintf() and only act
upon the error code returned from cg_set_control_value(). Previously
cgroup_set_values_recursive() mishandled the error handling when
the value's dirty flag was set.
Reported-by: Github User bharani-viswas
Fixes: 092e4aeb0416f ("api.c: Refactor duplicate logic in cgroup modify and
create")
Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com>
---
src/api.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/api.c b/src/api.c
index 11855be23314..51f9075f7595 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1913,13 +1913,7 @@ STATIC int cgroup_set_values_recursive(const char *
const base,
free(path);
path = NULL;
- /* don't consider error in files directly written by
- * the user as fatal */
- if (ret && !controller->values[j]->dirty) {
- ret = 0;
- continue;
- }
- if (ret)
+ if (error)
goto err;
controller->values[j]->dirty = false;
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel