]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroup2_devices: fix logic error
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 9 Mar 2020 13:33:16 +0000 (14:33 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 9 Mar 2020 20:47:46 +0000 (21:47 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgroup2_devices.c

index 7df81124223126a0d313f12fe131fd6caf1754c2..eef4647b09f1b11ed06df64a97292022a83d55e9 100644 (file)
@@ -348,7 +348,7 @@ int bpf_program_cgroup_attach(struct bpf_program *prog, int type,
        if (!prog)
                return ret_set_errno(-1, EINVAL);
 
-       if (flags & ~(BPF_F_ALLOW_OVERRIDE, BPF_F_ALLOW_MULTI))
+       if (flags & ~(BPF_F_ALLOW_OVERRIDE | BPF_F_ALLOW_MULTI))
                return log_error_errno(-1, EINVAL, "Invalid flags for bpf program");
 
        if (prog->attached_path) {