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,
struct lxc_list *it;
struct bpf_program *devices_old;
if (!unified)
return false;
if (lxc_list_empty(&conf->devices))
if (!unified || !unified->bpf_device_controller ||
!unified->container_full_path || lxc_list_empty(&conf->devices))
return true;
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