We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba2fd56 commit e23bb04Copy full SHA for e23bb04
kernel/bpf/sysfs_btf.c
@@ -30,15 +30,15 @@ static struct kobject *btf_kobj;
30
31
static int __init btf_vmlinux_init(void)
32
{
33
- if (!__start_BTF)
+ bin_attr_btf_vmlinux.size = __stop_BTF - __start_BTF;
34
+
35
+ if (!__start_BTF || bin_attr_btf_vmlinux.size == 0)
36
return 0;
37
38
btf_kobj = kobject_create_and_add("btf", kernel_kobj);
39
if (!btf_kobj)
40
return -ENOMEM;
41
- bin_attr_btf_vmlinux.size = __stop_BTF - __start_BTF;
-
42
return sysfs_create_bin_file(btf_kobj, &bin_attr_btf_vmlinux);
43
}
44
0 commit comments