aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 8e4528c9909f..2584c0e2762d 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -917,6 +917,10 @@ static int check_version(Elf_Shdr *sechdrs,
917 if (!crc) 917 if (!crc)
918 return 1; 918 return 1;
919 919
920 /* No versions at all? modprobe --force does this. */
921 if (versindex == 0)
922 return try_to_force_load(mod, symname) == 0;
923
920 versions = (void *) sechdrs[versindex].sh_addr; 924 versions = (void *) sechdrs[versindex].sh_addr;
921 num_versions = sechdrs[versindex].sh_size 925 num_versions = sechdrs[versindex].sh_size
922 / sizeof(struct modversion_info); 926 / sizeof(struct modversion_info);
@@ -932,8 +936,9 @@ static int check_version(Elf_Shdr *sechdrs,
932 goto bad_version; 936 goto bad_version;
933 } 937 }
934 938
935 if (!try_to_force_load(mod, symname)) 939 printk(KERN_WARNING "%s: no symbol version for %s\n",
936 return 1; 940 mod->name, symname);
941 return 0;
937 942
938bad_version: 943bad_version:
939 printk("%s: disagrees about version of symbol %s\n", 944 printk("%s: disagrees about version of symbol %s\n",