Skip to content

Commit 5343893

Browse files
chenhengqiKernel Patches Daemon
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") Signed-off-by: Hengqi Chen <[email protected]>
1 parent 1f6b339 commit 5343893

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
@@ -3075,8 +3075,7 @@ void bpf_jit_free(struct bpf_prog *prog)
30753075
* before freeing it.
30763076
*/
30773077
if (jit_data) {
3078-
bpf_arch_text_copy(&jit_data->ro_header->size, &jit_data->header->size,
3079-
sizeof(jit_data->header->size));
3078+
bpf_jit_binary_pack_finalize(jit_data->ro_header, jit_data->header);
30803079
kfree(jit_data);
30813080
}
30823081
prog->bpf_func -= cfi_get_offset();

0 commit comments

Comments
 (0)