Revision 27de809a3d83a6199664479ebb19712533d6fd9b authored by Björn Töpel on 28 October 2021, 12:51:15 UTC, committed by Jakub Kicinski on 28 October 2021, 15:14:30 UTC
The bpf_jit_binary_free() function requires a non-NULL argument. When
the RISC-V BPF JIT fails to converge in NR_JIT_ITERATIONS steps,
jit_data->header will be NULL, which triggers a NULL
dereference. Avoid this by checking the argument, prior calling the
function.

Fixes: ca6cb5447cec ("riscv, bpf: Factor common RISC-V JIT code")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20211028125115.514587-1-bjorn@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 20af886
History
File Mode Size
damon
.gitignore -rw-r--r-- 60 bytes
active_mm.rst -rw-r--r-- 3.8 KB
arch_pgtable_helpers.rst -rw-r--r-- 18.2 KB
balance.rst -rw-r--r-- 5.3 KB
cleancache.rst -rw-r--r-- 14.0 KB
free_page_reporting.rst -rw-r--r-- 2.0 KB
frontswap.rst -rw-r--r-- 15.1 KB
highmem.rst -rw-r--r-- 5.4 KB
hmm.rst -rw-r--r-- 21.0 KB
hugetlbfs_reserv.rst -rw-r--r-- 28.8 KB
hwpoison.rst -rw-r--r-- 5.9 KB
index.rst -rw-r--r-- 1.2 KB
ksm.rst -rw-r--r-- 3.4 KB
memory-model.rst -rw-r--r-- 7.9 KB
mmu_notifier.rst -rw-r--r-- 4.1 KB
numa.rst -rw-r--r-- 8.6 KB
overcommit-accounting.rst -rw-r--r-- 2.6 KB
page_frags.rst -rw-r--r-- 2.3 KB
page_migration.rst -rw-r--r-- 13.1 KB
page_owner.rst -rw-r--r-- 3.7 KB
remap_file_pages.rst -rw-r--r-- 1.6 KB
slub.rst -rw-r--r-- 14.2 KB
split_page_table_lock.rst -rw-r--r-- 3.6 KB
swap_numa.rst -rw-r--r-- 3.0 KB
transhuge.rst -rw-r--r-- 8.2 KB
unevictable-lru.rst -rw-r--r-- 28.4 KB
z3fold.rst -rw-r--r-- 1.2 KB
zsmalloc.rst -rw-r--r-- 3.0 KB
zswap.rst -rw-r--r-- 7.2 KB

back to top