Skip to content

Commit 2d311f4

Browse files
rddunlapborkmann
authored andcommitted
riscv, bpf: Fix patch_text implicit declaration
bpf_jit_comp64.c uses patch_text(), so add <asm/patch.h> to it to prevent the build error: ../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke': ../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration] 691 | ret = patch_text(ip, new_insns, ninsns); | ^~~~~~~~~~ Fixes: 596f2e6 ("riscv, bpf: Add bpf_arch_text_poke support for RV64") Reported-by: kernel test robot <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Pu Lehui <[email protected]> Acked-by: Björn Töpel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/bpf/[email protected]
1 parent a07484c commit 2d311f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/net/bpf_jit_comp64.c

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/filter.h>
1111
#include <linux/memory.h>
1212
#include <linux/stop_machine.h>
13+
#include <asm/patch.h>
1314
#include "bpf_jit.h"
1415

1516
#define RV_REG_TCC RV_REG_A6

0 commit comments

Comments
 (0)