cgroups/devices: correctly verify bpf device useability in cgfsng_devices_activate()

parent ec26ee91
...@@ -2749,10 +2749,8 @@ __cgfsng_ops bool cgfsng_devices_activate(struct cgroup_ops *ops, ...@@ -2749,10 +2749,8 @@ __cgfsng_ops bool cgfsng_devices_activate(struct cgroup_ops *ops,
struct lxc_list *it; struct lxc_list *it;
struct bpf_program *devices_old; struct bpf_program *devices_old;
if (!unified) if (!unified || !unified->bpf_device_controller ||
return false; !unified->container_full_path || lxc_list_empty(&conf->devices))
if (lxc_list_empty(&conf->devices))
return true; return true;
devices = bpf_program_new(BPF_PROG_TYPE_CGROUP_DEVICE); devices = bpf_program_new(BPF_PROG_TYPE_CGROUP_DEVICE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment