@@ -173,12 +173,16 @@ unsigned long kallsyms_lookup_name(const char *name)
unsigned long i;
unsigned int off;
- for (i = 0, off = 0; i < kallsyms_num_syms; i++) {
- off = kallsyms_expand_symbol(off, namebuf);
+ /* if a colon ':' found, skip the heavy kernel symbols */
+ if (strchr(name, ':') == NULL) {
+ for (i = 0, off = 0; i < kallsyms_num_syms; i++) {
+ off = kallsyms_expand_symbol(off, namebuf);
- if (strcmp(namebuf, name) == 0)
- return kallsyms_addresses[i];
+ if (strcmp(namebuf, name) == 0)
+ return kallsyms_addresses[i];
+ }
}
+
return module_kallsyms_lookup_name(name);
}
EXPORT_SYMBOL_GPL(kallsyms_lookup_name);