On Tue, Apr 28, 2020 at 08:58:39PM -0700, Song Liu wrote:
> +
> +static int bpf_enable_stats(union bpf_attr *attr)
> +{

CHECK_ATTR() is missing which makes it non-extensible.

> +     switch (attr->enable_stats.type) {
> +     case BPF_STATS_RUNTIME_CNT:
> +             return bpf_enable_runtime_stats();
> +     default:
> +             break;
> +     }
> +     return -EINVAL;
> +}

Reply via email to