1 Star 0 Fork 71

章北海/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
virCgroupKillRecursive-Return-1-on-failure-condition.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-12-06 15:38 . libvirt update to version 6.2.0-47
From 420abccb9e834938a5f03726559f044fb0aa426b Mon Sep 17 00:00:00 2001
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
Date: Tue, 29 Nov 2022 09:36:57 +0000
Subject: [PATCH 05/24] virCgroupKillRecursive: Return -1 on failure condition
virCgroupKillRecursive sneakily initializes 'ret' to 0 rather than the usual
-1. 401030499bf moved an error condition but didn't actually modify 'ret'
return the proper error code.
Fixes: 401030499bf
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: tangbin <tangbin_yewu@cmss.chinamobile.com>
(cherry-pick from 0778cff2aedd1da142562c396d482335df18e620)
---
src/util/vircgroup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 70d85200cb..f52a8cc843 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -2613,6 +2613,7 @@ virCgroupKillRecursive(virCgroupPtr group, int signum)
if (!backends || !backendAvailable) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("no cgroup backend available"));
+ ret = -1;
goto cleanup;
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dependent/libvirt.git
git@gitee.com:dependent/libvirt.git
dependent
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385