The patch titled modules: fix verify_export_symbols() has been removed from the -mm tree. Its filename was fix-verify_export_symbols.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: modules: fix verify_export_symbols() From: "Jan Beulich" <jbeulich@xxxxxxxxxx> When the newer export flavors were added, it was apparently forgotten to add respective code here. In order to not double the (source) size of the function, add some abstraction to reduce code duplication. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/module.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff -puN kernel/module.c~fix-verify_export_symbols kernel/module.c --- a/kernel/module.c~fix-verify_export_symbols +++ a/kernel/module.c @@ -1394,33 +1394,32 @@ EXPORT_SYMBOL_GPL(__symbol_get); */ static int verify_export_symbols(struct module *mod) { - const char *name = NULL; - unsigned long i, ret = 0; + const char *name; + unsigned int i; struct module *owner; const unsigned long *crc; - for (i = 0; i < mod->num_syms; i++) - if (!IS_ERR_VALUE(__find_symbol(mod->syms[i].name, - &owner, &crc, 1))) { - name = mod->syms[i].name; - ret = -ENOEXEC; - goto dup; - } +#define VERIFY(syms) \ + for (i = 0; i < mod->num_##syms; i++) { \ + name = mod->syms[i].name; \ + if (!IS_ERR_VALUE(__find_symbol(name, &owner, &crc, 1))) \ + goto dup; \ + } - for (i = 0; i < mod->num_gpl_syms; i++) - if (!IS_ERR_VALUE(__find_symbol(mod->gpl_syms[i].name, - &owner, &crc, 1))) { - name = mod->gpl_syms[i].name; - ret = -ENOEXEC; - goto dup; - } + VERIFY(syms); + VERIFY(gpl_syms); + VERIFY(gpl_future_syms); + VERIFY(unused_syms); + VERIFY(unused_gpl_syms); +#undef VERIFY + + return 0; dup: - if (ret) - printk(KERN_ERR "%s: exports duplicate symbol %s (owned by %s)\n", - mod->name, name, module_name(owner)); + printk(KERN_ERR "%s: exports duplicate symbol %s (owned by %s)\n", + mod->name, name, module_name(owner)); - return ret; + return -ENOEXEC; } /* Change all symbols so that st_value encodes the pointer directly. */ _ Patches currently in -mm which might be from jbeulich@xxxxxxxxxx are lib-swiotlbc-avoid-endless-loops-fix.patch git-x86.patch lib-swiotlbc-cleanups.patch make-module_sect_attrs-private-to-kernel-modulec-checkpatch-fixes.patch fix-verify_export_symbols.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html