return ret_errno(ENOMEM);
new->dfd_con = -EBADF;
- new->cgfd_limit = -EBADF;
+ new->dfd_lim = -EBADF;
new->dfd_mon = -EBADF;
new->fs_type = fs_type;
h->container_full_path = move_ptr(path);
if (fd_limit < 0)
- h->cgfd_limit = h->dfd_con;
+ h->dfd_lim = h->dfd_con;
else
- h->cgfd_limit = move_fd(fd_limit);
+ h->dfd_lim = move_fd(fd_limit);
if (limit_path)
h->container_limit_path = move_ptr(limit_path);
if (payload) {
/* Check whether we actually created the cgroup to prune. */
- if (h->cgfd_limit < 0)
+ if (h->dfd_lim < 0)
prune = false;
free_equal(h->container_full_path, h->container_limit_path);
- close_equal(h->dfd_con, h->cgfd_limit);
+ close_equal(h->dfd_con, h->dfd_lim);
} else {
/* Check whether we actually created the cgroup to prune. */
if (h->dfd_mon < 0)
free_equal((*it)->container_full_path,
(*it)->container_limit_path);
- close_equal((*it)->dfd_con, (*it)->cgfd_limit);
+ close_equal((*it)->dfd_con, (*it)->dfd_lim);
if ((*it)->dfd_mon >= 0)
close((*it)->dfd_mon);
* @container_limit_path.
* Will be equal to @dfd_con if no limiting cgroup has been requested.
*/
- int cgfd_limit;
+ int dfd_lim;
/* File descriptor for the monitor's cgroup. */
int dfd_mon;
return syserrno(false, "Failed to create bpf program");
ret = bpf_program_cgroup_attach(prog, BPF_CGROUP_DEVICE,
- ops->unified->cgfd_limit,
+ ops->unified->dfd_lim,
BPF_F_ALLOW_MULTI);
if (ret)
return syserrno(false, "Failed to attach bpf program");
if (!pure_unified_layout(ops))
return ret_set_errno(false, EINVAL);
- if (ops->unified->cgfd_limit < 0)
+ if (ops->unified->dfd_lim < 0)
return ret_set_errno(false, EBADF);
/*
TRACE("Sent signal %d to pidfd %d", stopsignal, handler->pid);
if (pure_unified_layout(cgroup_ops))
- ret = __cgroup_unfreeze(cgroup_ops->unified->cgfd_limit, -1);
+ ret = __cgroup_unfreeze(cgroup_ops->unified->dfd_lim, -1);
else
ret = cgroup_ops->unfreeze(cgroup_ops, -1);
if (ret)
if (!pure_unified_layout(ops) || !ops->unified)
return lxc_cmd_rsp_send(fd, &rsp);
- send_fd = limiting_cgroup ? ops->unified->cgfd_limit
+ send_fd = limiting_cgroup ? ops->unified->dfd_lim
: ops->unified->dfd_con;
rsp.ret = 0;