Commit 4c80c7b
bpf: Fix build in minimal configurations, again
Building with -Werror showed another failure:
kernel/bpf/btf.c: In function 'btf_get_prog_ctx_type.isra.31':
kernel/bpf/btf.c:3508:63: error: array subscript 0 is above array bounds of 'u8[0]' {aka 'unsigned char[0]'} [-Werror=array-bounds]
ctx_type = btf_type_member(conv_struct) + bpf_ctx_convert_map[prog_type] * 2;
I don't actually understand why the array is empty, but a similar
fix has addressed a related problem, so I suppose we can do the
same thing here.
Fixes: ce27709 ("bpf: Fix build in minimal configurations")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]1 parent e49e6f6 commit 4c80c7b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3470 | 3470 | | |
3471 | 3471 | | |
3472 | 3472 | | |
| 3473 | + | |
3473 | 3474 | | |
3474 | 3475 | | |
3475 | 3476 | | |
| |||
0 commit comments