Merge branch 'x86-bpf-jit-fixes'
Daniel Borkmann says: ==================== Fix two memory leaks in x86 JIT. For details, please see individual patches in this series. Thanks! ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Коммит
0f58e58e28
|
@ -1236,6 +1236,7 @@ skip_init_addrs:
|
|||
for (pass = 0; pass < 20 || image; pass++) {
|
||||
proglen = do_jit(prog, addrs, image, oldproglen, &ctx);
|
||||
if (proglen <= 0) {
|
||||
out_image:
|
||||
image = NULL;
|
||||
if (header)
|
||||
bpf_jit_binary_free(header);
|
||||
|
@ -1246,8 +1247,7 @@ skip_init_addrs:
|
|||
if (proglen != oldproglen) {
|
||||
pr_err("bpf_jit: proglen=%d != oldproglen=%d\n",
|
||||
proglen, oldproglen);
|
||||
prog = orig_prog;
|
||||
goto out_addrs;
|
||||
goto out_image;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1283,7 +1283,7 @@ skip_init_addrs:
|
|||
prog = orig_prog;
|
||||
}
|
||||
|
||||
if (!prog->is_func || extra_pass) {
|
||||
if (!image || !prog->is_func || extra_pass) {
|
||||
out_addrs:
|
||||
kfree(addrs);
|
||||
kfree(jit_data);
|
||||
|
|
Загрузка…
Ссылка в новой задаче