1
0
Fork 0
remarkable-linux/arch/s390
Daniel Borkmann a21b37053e bpf, s390: fix potential memleak when later bpf_jit_prog fails
[ Upstream commit f605ce5eb2 ]

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: 0546231057 ("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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24 13:09:09 +02:00
..
appldata License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
boot License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
configs s390: fix zfcpdump-config 2017-10-16 08:19:01 +02:00
crypto s390/crc32-vx: use expoline for indirect branches 2018-05-25 16:17:32 +02:00
hypfs hypfs_kill_super(): deal with failed allocations 2018-04-24 09:36:38 +02:00
include perf: fix invalid bit in diagnostic entry 2018-08-03 07:50:36 +02:00
kernel s390: Correct register corruption in critical section cleanup 2018-07-11 16:29:14 +02:00
kvm KVM: s390: vsie: fix < 8k check for the itdba 2018-05-30 07:51:50 +02:00
lib s390/lib: use expoline for indirect branches 2018-05-25 16:17:32 +02:00
mm s390/mm: fix off-by-one bug in 5-level page table handling 2017-12-14 09:52:56 +01:00
net bpf, s390: fix potential memleak when later bpf_jit_prog fails 2018-08-24 13:09:09 +02:00
numa License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci s390/pci: do not require AIS facility 2017-12-10 13:40:38 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild s390/crypto: Provide s390 specific arch random functionality. 2017-04-26 13:41:35 +02:00
Kconfig s390: add sysfs attributes for spectre 2018-04-29 11:33:15 +02:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile s390: add automatic detection of the spectre defense 2018-04-29 11:33:15 +02:00
defconfig s390: update defconfig 2017-06-08 15:53:48 +02:00