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 21f5a80 commit adc8c45Copy full SHA for adc8c45
tools/testing/selftests/bpf/progs/percpu_alloc_fail.c
@@ -17,6 +17,10 @@ struct val_with_rb_root_t {
17
struct bpf_spin_lock lock;
18
};
19
20
+struct val_600b_t {
21
+ char b[600];
22
+};
23
+
24
struct elem {
25
long sum;
26
struct val_t __percpu_kptr *pc;
@@ -161,4 +165,18 @@ int BPF_PROG(test_array_map_7)
161
165
return 0;
162
166
}
163
167
168
+SEC("?fentry.s/bpf_fentry_test1")
169
+__failure __msg("bpf_percpu_obj_new type size (600) is greater than 512")
170
+int BPF_PROG(test_array_map_8)
171
+{
172
+ struct val_600b_t __percpu_kptr *p;
173
174
+ p = bpf_percpu_obj_new(struct val_600b_t);
175
+ if (!p)
176
+ return 0;
177
178
+ bpf_percpu_obj_drop(p);
179
180
+}
181
164
182
char _license[] SEC("license") = "GPL";
0 commit comments