Lines Matching refs:fp
76 struct bpf_prog *fp; in bpf_prog_alloc() local
79 fp = __vmalloc(size, gfp_flags, PAGE_KERNEL); in bpf_prog_alloc()
80 if (fp == NULL) in bpf_prog_alloc()
85 vfree(fp); in bpf_prog_alloc()
89 fp->pages = size / PAGE_SIZE; in bpf_prog_alloc()
90 fp->aux = aux; in bpf_prog_alloc()
92 return fp; in bpf_prog_alloc()
101 struct bpf_prog *fp; in bpf_prog_realloc() local
109 fp = __vmalloc(size, gfp_flags, PAGE_KERNEL); in bpf_prog_realloc()
110 if (fp != NULL) { in bpf_prog_realloc()
111 memcpy(fp, fp_old, fp_old->pages * PAGE_SIZE); in bpf_prog_realloc()
112 fp->pages = size / PAGE_SIZE; in bpf_prog_realloc()
121 return fp; in bpf_prog_realloc()
125 void __bpf_prog_free(struct bpf_prog *fp) in __bpf_prog_free() argument
127 kfree(fp->aux); in __bpf_prog_free()
128 vfree(fp); in __bpf_prog_free()
629 void bpf_prog_select_runtime(struct bpf_prog *fp) in bpf_prog_select_runtime() argument
631 fp->bpf_func = (void *) __bpf_prog_run; in bpf_prog_select_runtime()
634 bpf_int_jit_compile(fp); in bpf_prog_select_runtime()
636 bpf_prog_lock_ro(fp); in bpf_prog_select_runtime()
649 void bpf_prog_free(struct bpf_prog *fp) in bpf_prog_free() argument
651 struct bpf_prog_aux *aux = fp->aux; in bpf_prog_free()
654 aux->prog = fp; in bpf_prog_free()