Skip to content

Commit 5bf2fc1

Browse files
Aditya Pakkiborkmann
authored andcommitted
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 <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 7745ff9 commit 5bf2fc1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/bpf/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
222222
u32 pages, delta;
223223
int ret;
224224

225-
BUG_ON(fp_old == NULL);
226-
227225
size = round_up(size, PAGE_SIZE);
228226
pages = size / PAGE_SIZE;
229227
if (pages <= fp_old->pages)

0 commit comments

Comments
 (0)