• Home
  • Raw
  • Download

Lines Matching refs:err

886 	int err;  in ref_module()  local
892 err = strong_try_module_get(b); in ref_module()
893 if (err) in ref_module()
894 return err; in ref_module()
896 err = add_module_usage(a, b); in ref_module()
897 if (err) { in ref_module()
899 return err; in ref_module()
1473 int err; in resolve_symbol() local
1500 err = verify_namespace_is_imported(info, sym, mod); in resolve_symbol()
1501 if (err) { in resolve_symbol()
1502 sym = ERR_PTR(err); in resolve_symbol()
1506 err = ref_module(mod, owner); in resolve_symbol()
1507 if (err) { in resolve_symbol()
1508 sym = ERR_PTR(err); in resolve_symbol()
1880 int err; in mod_sysfs_init() local
1885 err = -EINVAL; in mod_sysfs_init()
1893 err = -EINVAL; in mod_sysfs_init()
1901 err = kobject_init_and_add(&mod->mkobj.kobj, &module_ktype, NULL, in mod_sysfs_init()
1903 if (err) in mod_sysfs_init()
1907 return err; in mod_sysfs_init()
1915 int err; in mod_sysfs_setup() local
1917 err = mod_sysfs_init(mod); in mod_sysfs_setup()
1918 if (err) in mod_sysfs_setup()
1923 err = -ENOMEM; in mod_sysfs_setup()
1927 err = module_param_sysfs_setup(mod, kparam, num_params); in mod_sysfs_setup()
1928 if (err) in mod_sysfs_setup()
1931 err = module_add_modinfo_attrs(mod); in mod_sysfs_setup()
1932 if (err) in mod_sysfs_setup()
1935 err = add_usage_links(mod); in mod_sysfs_setup()
1936 if (err) in mod_sysfs_setup()
1953 return err; in mod_sysfs_setup()
2447 int err = 0; in apply_relocations() local
2462 err = klp_apply_section_relocs(mod, info->sechdrs, in apply_relocations()
2468 err = apply_relocate(info->sechdrs, info->strtab, in apply_relocations()
2471 err = apply_relocate_add(info->sechdrs, info->strtab, in apply_relocations()
2473 if (err < 0) in apply_relocations()
2476 return err; in apply_relocations()
2939 int err = -ENODATA; in module_sig_check() local
2953 err = mod_verify_sig(mod, info); in module_sig_check()
2956 switch (err) { in module_sig_check()
2980 return err; in module_sig_check()
3022 int err; in elf_validity_check() local
3053 err = validate_section_offset(info, strhdr); in elf_validity_check()
3054 if (err < 0) in elf_validity_check()
3055 return err; in elf_validity_check()
3087 err = validate_section_offset(info, shdr); in elf_validity_check()
3088 if (err < 0) { in elf_validity_check()
3091 return err; in elf_validity_check()
3163 int err; in copy_module_from_user() local
3169 err = security_kernel_load_data(LOADING_MODULE, true); in copy_module_from_user()
3170 if (err) in copy_module_from_user()
3171 return err; in copy_module_from_user()
3179 err = -EFAULT; in copy_module_from_user()
3183 err = security_kernel_post_load_data((char *)info->hdr, info->len, in copy_module_from_user()
3186 if (err) in copy_module_from_user()
3189 return err; in copy_module_from_user()
3283 int err; in check_modinfo() local
3290 err = try_to_force_load(mod, "bad vermagic"); in check_modinfo()
3291 if (err) in check_modinfo()
3292 return err; in check_modinfo()
3314 err = check_modinfo_livepatch(mod, info); in check_modinfo()
3315 if (err) in check_modinfo()
3316 return err; in check_modinfo()
3591 int err; in layout_and_allocate() local
3593 err = check_modinfo(info->mod, info, flags); in layout_and_allocate()
3594 if (err) in layout_and_allocate()
3595 return ERR_PTR(err); in layout_and_allocate()
3598 err = module_frob_arch_sections(info->hdr, info->sechdrs, in layout_and_allocate()
3600 if (err < 0) in layout_and_allocate()
3601 return ERR_PTR(err); in layout_and_allocate()
3603 err = module_enforce_rwx_sections(info->hdr, info->sechdrs, in layout_and_allocate()
3605 if (err < 0) in layout_and_allocate()
3606 return ERR_PTR(err); in layout_and_allocate()
3636 err = move_module(info->mod, info); in layout_and_allocate()
3637 if (err) in layout_and_allocate()
3638 return ERR_PTR(err); in layout_and_allocate()
3867 int err; in add_unformed_module() local
3879 err = wait_event_interruptible(module_wq, in add_unformed_module()
3881 if (err) in add_unformed_module()
3898 err = -EEXIST; in add_unformed_module()
3900 err = -EBUSY; in add_unformed_module()
3906 err = 0; in add_unformed_module()
3911 return err; in add_unformed_module()
3916 int err; in complete_formation() local
3921 err = verify_exported_symbols(mod); in complete_formation()
3922 if (err < 0) in complete_formation()
3942 return err; in complete_formation()
3947 int err; in prepare_coming_module() local
3950 err = klp_module_coming(mod); in prepare_coming_module()
3951 if (err) in prepare_coming_module()
3952 return err; in prepare_coming_module()
3954 err = blocking_notifier_call_chain_robust(&module_notify_list, in prepare_coming_module()
3956 err = notifier_to_errno(err); in prepare_coming_module()
3957 if (err) in prepare_coming_module()
3960 return err; in prepare_coming_module()
3989 long err = 0; in load_module() local
4004 err = module_sig_check(info, flags); in load_module()
4005 if (err) in load_module()
4012 err = elf_validity_check(info); in load_module()
4013 if (err) { in load_module()
4022 err = setup_load_info(info, flags); in load_module()
4023 if (err) in load_module()
4031 err = -EPERM; in load_module()
4036 err = rewrite_section_headers(info, flags); in load_module()
4037 if (err) in load_module()
4042 err = -ENOEXEC; in load_module()
4049 err = PTR_ERR(mod); in load_module()
4056 err = add_unformed_module(mod); in load_module()
4057 if (err) in load_module()
4071 err = percpu_modalloc(mod, info); in load_module()
4072 if (err) in load_module()
4076 err = module_unload_init(mod); in load_module()
4077 if (err) in load_module()
4084 err = find_module_sections(mod, info); in load_module()
4085 if (err) in load_module()
4088 err = check_module_license_and_versions(mod); in load_module()
4089 if (err) in load_module()
4096 err = simplify_symbols(mod, info); in load_module()
4097 if (err < 0) in load_module()
4100 err = apply_relocations(mod, info); in load_module()
4101 if (err < 0) in load_module()
4104 err = post_relocation(mod, info); in load_module()
4105 if (err < 0) in load_module()
4116 err = PTR_ERR(mod->args); in load_module()
4126 err = complete_formation(mod, info); in load_module()
4127 if (err) in load_module()
4130 err = prepare_coming_module(mod); in load_module()
4131 if (err) in load_module()
4139 err = PTR_ERR(after_dashes); in load_module()
4147 err = mod_sysfs_setup(mod, info, mod->kp, mod->num_kp); in load_module()
4148 if (err < 0) in load_module()
4152 err = copy_module_elf(mod, info); in load_module()
4153 if (err < 0) in load_module()
4208 return err; in load_module()
4214 int err; in SYSCALL_DEFINE3() local
4217 err = may_init_module(); in SYSCALL_DEFINE3()
4218 if (err) in SYSCALL_DEFINE3()
4219 return err; in SYSCALL_DEFINE3()
4224 err = copy_module_from_user(umod, len, &info); in SYSCALL_DEFINE3()
4225 if (err) in SYSCALL_DEFINE3()
4226 return err; in SYSCALL_DEFINE3()
4235 int err; in SYSCALL_DEFINE3() local
4237 err = may_init_module(); in SYSCALL_DEFINE3()
4238 if (err) in SYSCALL_DEFINE3()
4239 return err; in SYSCALL_DEFINE3()
4247 err = kernel_read_file_from_fd(fd, 0, &hdr, INT_MAX, NULL, in SYSCALL_DEFINE3()
4249 if (err < 0) in SYSCALL_DEFINE3()
4250 return err; in SYSCALL_DEFINE3()
4252 info.len = err; in SYSCALL_DEFINE3()
4657 int err = seq_open(file, &modules_op); in modules_open() local
4659 if (!err) { in modules_open()
4664 return err; in modules_open()