aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/net/bpf_jit_comp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/net/bpf_jit_comp.c')
-rw-r--r--arch/arm64/net/bpf_jit_comp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index ef35e866caf7..dd428807cb30 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -762,7 +762,7 @@ void bpf_jit_compile(struct bpf_prog *prog)
762 /* Nothing to do here. We support Internal BPF. */ 762 /* Nothing to do here. We support Internal BPF. */
763} 763}
764 764
765void bpf_int_jit_compile(struct bpf_prog *prog) 765struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
766{ 766{
767 struct bpf_binary_header *header; 767 struct bpf_binary_header *header;
768 struct jit_ctx ctx; 768 struct jit_ctx ctx;
@@ -770,14 +770,14 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
770 u8 *image_ptr; 770 u8 *image_ptr;
771 771
772 if (!bpf_jit_enable) 772 if (!bpf_jit_enable)
773 return; 773 return prog;
774 774
775 memset(&ctx, 0, sizeof(ctx)); 775 memset(&ctx, 0, sizeof(ctx));
776 ctx.prog = prog; 776 ctx.prog = prog;
777 777
778 ctx.offset = kcalloc(prog->len, sizeof(int), GFP_KERNEL); 778 ctx.offset = kcalloc(prog->len, sizeof(int), GFP_KERNEL);
779 if (ctx.offset == NULL) 779 if (ctx.offset == NULL)
780 return; 780 return prog;
781 781
782 /* 1. Initial fake pass to compute ctx->idx. */ 782 /* 1. Initial fake pass to compute ctx->idx. */
783 783
@@ -828,6 +828,7 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
828 prog->jited = 1; 828 prog->jited = 1;
829out: 829out:
830 kfree(ctx.offset); 830 kfree(ctx.offset);
831 return prog;
831} 832}
832 833
833void bpf_jit_free(struct bpf_prog *prog) 834void bpf_jit_free(struct bpf_prog *prog)