summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-06-28 23:34:58 +0200
committerAlexei Starovoitov <ast@kernel.org>2018-06-29 10:47:35 -0700
commitf605ce5eb26ac934fb8106d75d46a2c875a2bf23 (patch)
tree97ee4598527128b1a2f4e4f0795ddbb4f62499d2 /kernel/bpf
parent18d405af30bf6506bf2fc49056de7691c949812e (diff)
downloadlinux-stable-f605ce5eb26ac934fb8106d75d46a2c875a2bf23.tar.gz
linux-stable-f605ce5eb26ac934fb8106d75d46a2c875a2bf23.tar.bz2
linux-stable-f605ce5eb26ac934fb8106d75d46a2c875a2bf23.zip
bpf, s390: fix potential memleak when later bpf_jit_prog fails
If we would ever fail in the bpf_jit_prog() pass that writes the actual insns to the image after we got header via bpf_jit_binary_alloc() then we also need to make sure to free it through bpf_jit_binary_free() again when bailing out. Given we had prior bpf_jit_prog() passes to initially probe for clobbered registers, program size and to fill in addrs arrray for jump targets, this is more of a theoretical one, but at least make sure this doesn't break with future changes. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions