aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAditya Pakki <pakki001@umn.edu>2019-12-19 11:57:35 -0600
committerDaniel Borkmann <daniel@iogearbox.net>2019-12-19 22:24:15 +0100
commit5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d (patch)
treef69fca17e381176879e936428734a9b2a8dc2214 /kernel
parentlibbpf: Fix another __u64 printf warning (diff)
downloadlinux-dev-5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d.tar.xz
linux-dev-5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d.zip
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 2ff01a716128..7622dfc36705 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -222,8 +222,6 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
u32 pages, delta;
int ret;
- BUG_ON(fp_old == NULL);
-
size = round_up(size, PAGE_SIZE);
pages = size / PAGE_SIZE;
if (pages <= fp_old->pages)