Lines Matching refs:err
126 int err; in bpf_struct_ops_image_alloc() local
128 err = bpf_jit_charge_modmem(PAGE_SIZE); in bpf_struct_ops_image_alloc()
129 if (err) in bpf_struct_ops_image_alloc()
130 return ERR_PTR(err); in bpf_struct_ops_image_alloc()
342 int i, err; in bpf_struct_ops_desc_init() local
402 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
409 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
416 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
435 err = -EOPNOTSUPP; in bpf_struct_ops_desc_init()
445 err = -EINVAL; in bpf_struct_ops_desc_init()
450 err = prepare_arg_info(btf, st_ops->name, mname, in bpf_struct_ops_desc_init()
453 if (err) in bpf_struct_ops_desc_init()
460 err = -EINVAL; in bpf_struct_ops_desc_init()
469 return err; in bpf_struct_ops_desc_init()
688 int prog_fd, err; in bpf_struct_ops_map_update_elem() local
701 err = check_zero_holes(st_map->btf, st_ops_desc->value_type, value); in bpf_struct_ops_map_update_elem()
702 if (err) in bpf_struct_ops_map_update_elem()
703 return err; in bpf_struct_ops_map_update_elem()
706 err = check_zero_holes(st_map->btf, t, uvalue->data); in bpf_struct_ops_map_update_elem()
707 if (err) in bpf_struct_ops_map_update_elem()
708 return err; in bpf_struct_ops_map_update_elem()
723 err = -EBUSY; in bpf_struct_ops_map_update_elem()
753 err = st_ops->init_member(t, member, kdata, udata); in bpf_struct_ops_map_update_elem()
754 if (err < 0) in bpf_struct_ops_map_update_elem()
758 if (err > 0) in bpf_struct_ops_map_update_elem()
773 err = PTR_ERR(mtype); in bpf_struct_ops_map_update_elem()
778 err = -EINVAL; in bpf_struct_ops_map_update_elem()
792 err = PTR_ERR(prog); in bpf_struct_ops_map_update_elem()
800 err = -EINVAL; in bpf_struct_ops_map_update_elem()
807 err = -ENOMEM; in bpf_struct_ops_map_update_elem()
816 err = -ENOMEM; in bpf_struct_ops_map_update_elem()
822 err = bpf_struct_ops_prepare_trampoline(tlinks, link, in bpf_struct_ops_map_update_elem()
827 if (err) in bpf_struct_ops_map_update_elem()
849 err = st_ops->validate(kdata); in bpf_struct_ops_map_update_elem()
850 if (err) in bpf_struct_ops_map_update_elem()
854 err = arch_protect_bpf_trampoline(st_map->image_pages[i], in bpf_struct_ops_map_update_elem()
856 if (err) in bpf_struct_ops_map_update_elem()
861 err = 0; in bpf_struct_ops_map_update_elem()
870 err = st_ops->reg(kdata, NULL); in bpf_struct_ops_map_update_elem()
871 if (likely(!err)) { in bpf_struct_ops_map_update_elem()
902 if (!err) in bpf_struct_ops_map_update_elem()
904 return err; in bpf_struct_ops_map_update_elem()
940 int err; in bpf_struct_ops_map_seq_show_elem() local
946 err = bpf_struct_ops_map_sys_lookup_elem(map, key, value); in bpf_struct_ops_map_seq_show_elem()
947 if (!err) { in bpf_struct_ops_map_seq_show_elem()
1237 int err; in bpf_struct_ops_map_link_update() local
1252 err = -ENOLINK; in bpf_struct_ops_map_link_update()
1256 err = -EPERM; in bpf_struct_ops_map_link_update()
1263 err = -EINVAL; in bpf_struct_ops_map_link_update()
1267 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()
1268 if (err) in bpf_struct_ops_map_link_update()
1278 return err; in bpf_struct_ops_map_link_update()
1336 int err; in bpf_struct_ops_link_create() local
1345 err = -EINVAL; in bpf_struct_ops_link_create()
1351 err = -ENOMEM; in bpf_struct_ops_link_create()
1357 err = bpf_link_prime(&link->link, &link_primer); in bpf_struct_ops_link_create()
1358 if (err) in bpf_struct_ops_link_create()
1367 err = st_map->st_ops_desc->st_ops->reg(st_map->kvalue.data, &link->link); in bpf_struct_ops_link_create()
1368 if (err) { in bpf_struct_ops_link_create()
1382 return err; in bpf_struct_ops_link_create()