On 2012年11月28日 21:34, Ján Tomko wrote:
The size of the controllers array is VIR_CGROUP_CONTROLLER_LAST, however we only call it with values less than VIR_CGROUP_CONTROLLER_LAST. --- src/util/cgroup.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index 9e78314..490f1de 100644 --- a/src/util/cgroup.c +++ b/src/util/cgroup.c @@ -814,7 +814,7 @@ int virCgroupAddTask(virCgroupPtr group, pid_t pid) */ int virCgroupAddTaskController(virCgroupPtr group, pid_t pid, int controller) { - if (controller< 0 || controller> VIR_CGROUP_CONTROLLER_LAST) + if (controller< 0 || controller>= VIR_CGROUP_CONTROLLER_LAST) return -EINVAL; if (!group->controllers[controller].mountPoint)
ACK. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list