Lines Matching refs:fprog
263 struct sock_fprog_kern *fprog; in __fprog_create() local
268 fprog = kmalloc(sizeof(*fprog), GFP_KERNEL); in __fprog_create()
269 if (!fprog) in __fprog_create()
271 fprog->filter = kmemdup(filter, data_len, GFP_KERNEL); in __fprog_create()
272 if (!fprog->filter) { in __fprog_create()
273 kfree(fprog); in __fprog_create()
276 fprog->len = data_len / sizeof(struct sock_filter); in __fprog_create()
277 *pfprog = fprog; in __fprog_create()
281 static void __fprog_destroy(struct sock_fprog_kern *fprog) in __fprog_destroy() argument
283 kfree(fprog->filter); in __fprog_destroy()
284 kfree(fprog); in __fprog_destroy()
292 struct sock_fprog_kern *fprog = NULL; in lb_bpf_func_set() local
296 err = __fprog_create(&fprog, ctx->data.bin_val.len, in lb_bpf_func_set()
300 err = bpf_prog_create(&fp, fprog); in lb_bpf_func_set()
302 __fprog_destroy(fprog); in lb_bpf_func_set()
315 lb_priv->ex->orig_fprog = fprog; in lb_bpf_func_set()