From d49c180826e56771a1cdb31eb01fe258a4b74076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 8 Nov 2019 11:17:08 +0100 Subject: [PATCH] bpf: do not bother adding device patterns after whitelisting the full class This seems to have been unintentional. --- src/core/cgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/cgroup.c b/src/core/cgroup.c index d024f88e6a..61d5a4dfca 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -750,9 +750,7 @@ static int whitelist_major(BPFProgram *prog, const char *path, const char *name, if (streq(name, "*")) { /* If the name is a wildcard, then apply this list to all devices of this type */ (void) whitelist_device_pattern(prog, path, type, NULL, NULL, acc); - - if (cg_all_unified() <= 0) - return 0; + return 0; } if (safe_atou(name, &maj) >= 0 && DEVICE_MAJOR_VALID(maj)) {