]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Remove unnecessary assertion on fp_old
authorAditya Pakki <pakki001@umn.edu>
Thu, 19 Dec 2019 17:57:35 +0000 (11:57 -0600)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 19 Dec 2019 21:24:15 +0000 (22:24 +0100)
commited9c1486e9433725e88c4ff5f11d6caeb536a027
treef69fca17e381176879e936428734a9b2a8dc2214
parent3c8df6ac626bd53c6b5f9f8b226f68bc5560bc94
bpf: Remove unnecessary assertion on fp_old

The two callers of bpf_prog_realloc - bpf_patch_insn_single and
bpf_migrate_filter dereference the struct fp_old, before passing
it to the function. Thus assertion to check fp_old is unnecessary
and can be removed.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191219175735.19231-1-pakki001@umn.edu
kernel/bpf/core.c