Lines Matching refs:err
119 int err; in param_set_bool_enable_only() local
125 err = param_set_bool(val, &dummy_kp); in param_set_bool_enable_only()
126 if (err) in param_set_bool_enable_only()
127 return err; in param_set_bool_enable_only()
688 int err; in ref_module() local
694 err = strong_try_module_get(b); in ref_module()
695 if (err) in ref_module()
696 return err; in ref_module()
698 err = add_module_usage(a, b); in ref_module()
699 if (err) { in ref_module()
701 return err; in ref_module()
1264 int err; in resolve_symbol() local
1278 err = ref_module(mod, owner); in resolve_symbol()
1279 if (err) { in resolve_symbol()
1280 sym = ERR_PTR(err); in resolve_symbol()
1609 int err; in mod_sysfs_init() local
1615 err = -EINVAL; in mod_sysfs_init()
1623 err = -EINVAL; in mod_sysfs_init()
1631 err = kobject_init_and_add(&mod->mkobj.kobj, &module_ktype, NULL, in mod_sysfs_init()
1633 if (err) in mod_sysfs_init()
1638 return err; in mod_sysfs_init()
1646 int err; in mod_sysfs_setup() local
1648 err = mod_sysfs_init(mod); in mod_sysfs_setup()
1649 if (err) in mod_sysfs_setup()
1654 err = -ENOMEM; in mod_sysfs_setup()
1658 err = module_param_sysfs_setup(mod, kparam, num_params); in mod_sysfs_setup()
1659 if (err) in mod_sysfs_setup()
1662 err = module_add_modinfo_attrs(mod); in mod_sysfs_setup()
1663 if (err) in mod_sysfs_setup()
1680 return err; in mod_sysfs_setup()
2022 int err = 0; in apply_relocations() local
2037 err = apply_relocate(info->sechdrs, info->strtab, in apply_relocations()
2040 err = apply_relocate_add(info->sechdrs, info->strtab, in apply_relocations()
2042 if (err < 0) in apply_relocations()
2045 return err; in apply_relocations()
2454 int err = -ENOKEY; in module_sig_check() local
2462 err = mod_verify_sig(mod, &info->len); in module_sig_check()
2465 if (!err) { in module_sig_check()
2471 if (err < 0 && fips_enabled) in module_sig_check()
2473 err); in module_sig_check()
2474 if (err == -ENOKEY && !sig_enforce) in module_sig_check()
2475 err = 0; in module_sig_check()
2477 return err; in module_sig_check()
2510 int err; in copy_module_from_user() local
2516 err = security_kernel_module_from_file(NULL); in copy_module_from_user()
2517 if (err) in copy_module_from_user()
2518 return err; in copy_module_from_user()
2537 int err; in copy_module_from_fd() local
2546 err = security_kernel_module_from_file(file); in copy_module_from_fd()
2547 if (err) in copy_module_from_fd()
2550 err = vfs_getattr(&file->f_path, &stat); in copy_module_from_fd()
2551 if (err) in copy_module_from_fd()
2555 err = -EFBIG; in copy_module_from_fd()
2561 err = -EINVAL; in copy_module_from_fd()
2567 err = -ENOMEM; in copy_module_from_fd()
2577 err = bytes; in copy_module_from_fd()
2588 return err; in copy_module_from_fd()
2645 int err; in setup_load_info() local
2653 err = rewrite_section_headers(info, flags); in setup_load_info()
2654 if (err) in setup_load_info()
2655 return ERR_PTR(err); in setup_load_info()
2694 int err; in check_modinfo() local
2701 err = try_to_force_load(mod, "bad vermagic"); in check_modinfo()
2702 if (err) in check_modinfo()
2703 return err; in check_modinfo()
2931 int err; in layout_and_allocate() local
2937 err = check_modinfo(mod, info, flags); in layout_and_allocate()
2938 if (err) in layout_and_allocate()
2939 return ERR_PTR(err); in layout_and_allocate()
2942 err = module_frob_arch_sections(info->hdr, info->sechdrs, in layout_and_allocate()
2944 if (err < 0) in layout_and_allocate()
2950 err = percpu_modalloc(mod, in layout_and_allocate()
2952 if (err) in layout_and_allocate()
2964 err = move_module(mod, info); in layout_and_allocate()
2965 if (err) in layout_and_allocate()
2976 return ERR_PTR(err); in layout_and_allocate()
3148 int err; in add_unformed_module() local
3160 err = wait_event_interruptible(module_wq, in add_unformed_module()
3162 if (err) in add_unformed_module()
3166 err = -EEXIST; in add_unformed_module()
3170 err = 0; in add_unformed_module()
3175 return err; in add_unformed_module()
3180 int err; in complete_formation() local
3185 err = verify_export_symbols(mod); in complete_formation()
3186 if (err < 0) in complete_formation()
3198 return err; in complete_formation()
3207 long err; in load_module() local
3209 err = module_sig_check(info); in load_module()
3210 if (err) in load_module()
3213 err = elf_header_check(info); in load_module()
3214 if (err) in load_module()
3220 err = PTR_ERR(mod); in load_module()
3225 err = add_unformed_module(mod); in load_module()
3226 if (err) in load_module()
3241 err = module_unload_init(mod); in load_module()
3242 if (err) in load_module()
3249 err = check_module_license_and_versions(mod); in load_module()
3250 if (err) in load_module()
3257 err = simplify_symbols(mod, info); in load_module()
3258 if (err < 0) in load_module()
3261 err = apply_relocations(mod, info); in load_module()
3262 if (err < 0) in load_module()
3265 err = post_relocation(mod, info); in load_module()
3266 if (err < 0) in load_module()
3274 err = PTR_ERR(mod->args); in load_module()
3281 err = complete_formation(mod, info); in load_module()
3282 if (err) in load_module()
3286 err = parse_args(mod->name, mod->args, mod->kp, mod->num_kp, in load_module()
3288 if (err < 0) in load_module()
3292 err = mod_sysfs_setup(mod, info, mod->kp, mod->num_kp); in load_module()
3293 if (err < 0) in load_module()
3329 return err; in load_module()
3335 int err; in SYSCALL_DEFINE3() local
3338 err = may_init_module(); in SYSCALL_DEFINE3()
3339 if (err) in SYSCALL_DEFINE3()
3340 return err; in SYSCALL_DEFINE3()
3345 err = copy_module_from_user(umod, len, &info); in SYSCALL_DEFINE3()
3346 if (err) in SYSCALL_DEFINE3()
3347 return err; in SYSCALL_DEFINE3()
3354 int err; in SYSCALL_DEFINE3() local
3357 err = may_init_module(); in SYSCALL_DEFINE3()
3358 if (err) in SYSCALL_DEFINE3()
3359 return err; in SYSCALL_DEFINE3()
3367 err = copy_module_from_fd(fd, &info); in SYSCALL_DEFINE3()
3368 if (err) in SYSCALL_DEFINE3()
3369 return err; in SYSCALL_DEFINE3()