Skip to content

Commit 6ff4a0f

Browse files
chenhengqiAlexei Starovoitov
authored andcommitted
bpf, arm64: Call bpf_jit_binary_pack_finalize() in bpf_jit_free()
The current implementation seems incorrect and does NOT match the comment above, use bpf_jit_binary_pack_finalize() instead. Fixes: 1dad391 ("bpf, arm64: use bpf_prog_pack for memory management") Acked-by: Puranjay Mohan <[email protected]> Signed-off-by: Hengqi Chen <[email protected]> Acked-by: Song Liu <[email protected]> Acked-by: Puranjay Mohan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent a24a2dd commit 6ff4a0f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/arm64/net/bpf_jit_comp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,8 +3115,7 @@ void bpf_jit_free(struct bpf_prog *prog)
31153115
* before freeing it.
31163116
*/
31173117
if (jit_data) {
3118-
bpf_arch_text_copy(&jit_data->ro_header->size, &jit_data->header->size,
3119-
sizeof(jit_data->header->size));
3118+
bpf_jit_binary_pack_finalize(jit_data->ro_header, jit_data->header);
31203119
kfree(jit_data);
31213120
}
31223121
prog->bpf_func -= cfi_get_offset();

0 commit comments

Comments
 (0)