Lines Matching refs:err
127 int err; in bpf_struct_ops_image_alloc() local
129 err = bpf_jit_charge_modmem(PAGE_SIZE); in bpf_struct_ops_image_alloc()
130 if (err) in bpf_struct_ops_image_alloc()
131 return ERR_PTR(err); in bpf_struct_ops_image_alloc()
328 int i, err; in bpf_struct_ops_desc_init() local
388 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
395 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
402 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
421 err = -EINVAL; in bpf_struct_ops_desc_init()
426 err = prepare_arg_info(btf, st_ops->name, mname, in bpf_struct_ops_desc_init()
429 if (err) in bpf_struct_ops_desc_init()
436 err = -EINVAL; in bpf_struct_ops_desc_init()
445 return err; in bpf_struct_ops_desc_init()
664 int prog_fd, err; in bpf_struct_ops_map_update_elem() local
677 err = check_zero_holes(st_map->btf, st_ops_desc->value_type, value); in bpf_struct_ops_map_update_elem()
678 if (err) in bpf_struct_ops_map_update_elem()
679 return err; in bpf_struct_ops_map_update_elem()
682 err = check_zero_holes(st_map->btf, t, uvalue->data); in bpf_struct_ops_map_update_elem()
683 if (err) in bpf_struct_ops_map_update_elem()
684 return err; in bpf_struct_ops_map_update_elem()
699 err = -EBUSY; in bpf_struct_ops_map_update_elem()
729 err = st_ops->init_member(t, member, kdata, udata); in bpf_struct_ops_map_update_elem()
730 if (err < 0) in bpf_struct_ops_map_update_elem()
734 if (err > 0) in bpf_struct_ops_map_update_elem()
749 err = PTR_ERR(mtype); in bpf_struct_ops_map_update_elem()
754 err = -EINVAL; in bpf_struct_ops_map_update_elem()
768 err = PTR_ERR(prog); in bpf_struct_ops_map_update_elem()
776 err = -EINVAL; in bpf_struct_ops_map_update_elem()
783 err = -ENOMEM; in bpf_struct_ops_map_update_elem()
792 err = -ENOMEM; in bpf_struct_ops_map_update_elem()
798 err = bpf_struct_ops_prepare_trampoline(tlinks, link, in bpf_struct_ops_map_update_elem()
803 if (err) in bpf_struct_ops_map_update_elem()
825 err = st_ops->validate(kdata); in bpf_struct_ops_map_update_elem()
826 if (err) in bpf_struct_ops_map_update_elem()
830 err = arch_protect_bpf_trampoline(st_map->image_pages[i], in bpf_struct_ops_map_update_elem()
832 if (err) in bpf_struct_ops_map_update_elem()
837 err = 0; in bpf_struct_ops_map_update_elem()
846 err = st_ops->reg(kdata, NULL); in bpf_struct_ops_map_update_elem()
847 if (likely(!err)) { in bpf_struct_ops_map_update_elem()
878 if (!err) in bpf_struct_ops_map_update_elem()
880 return err; in bpf_struct_ops_map_update_elem()
916 int err; in bpf_struct_ops_map_seq_show_elem() local
922 err = bpf_struct_ops_map_sys_lookup_elem(map, key, value); in bpf_struct_ops_map_seq_show_elem()
923 if (!err) { in bpf_struct_ops_map_seq_show_elem()
1213 int err; in bpf_struct_ops_map_link_update() local
1228 err = -ENOLINK; in bpf_struct_ops_map_link_update()
1232 err = -EPERM; in bpf_struct_ops_map_link_update()
1239 err = -EINVAL; in bpf_struct_ops_map_link_update()
1243 err = st_map->st_ops_desc->st_ops->update(st_map->kvalue.data, old_st_map->kvalue.data, link); in bpf_struct_ops_map_link_update()
1244 if (err) in bpf_struct_ops_map_link_update()
1254 return err; in bpf_struct_ops_map_link_update()
1312 int err; in bpf_struct_ops_link_create() local
1321 err = -EINVAL; in bpf_struct_ops_link_create()
1327 err = -ENOMEM; in bpf_struct_ops_link_create()
1332 err = bpf_link_prime(&link->link, &link_primer); in bpf_struct_ops_link_create()
1333 if (err) in bpf_struct_ops_link_create()
1342 err = st_map->st_ops_desc->st_ops->reg(st_map->kvalue.data, &link->link); in bpf_struct_ops_link_create()
1343 if (err) { in bpf_struct_ops_link_create()
1357 return err; in bpf_struct_ops_link_create()