summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-04 05:12:27 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-04 05:12:27 +0300
commita1be8edda4fe1f0a75007f26000a51436800869d (patch)
tree69ecbeda52cfa375431de08e9dcfbcede4ed4883 /kernel
parent4c174688ee92805aa5df6e06e5b625a3286e415c (diff)
parent17586188276980ff10d1244a35aeb31ae199705e (diff)
downloadlinux-a1be8edda4fe1f0a75007f26000a51436800869d.tar.xz
Merge tag 'modules-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
Pull modules updates from Jessica Yu: - Minor code cleanups - Fix section alignment for .init_array * tag 'modules-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: kallsyms: Use bounded strnchr() when parsing string module: Unify the return value type of try_module_get module: set .init_array alignment to 8
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 63321952c71c..f37308b733d8 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -4035,7 +4035,7 @@ unsigned long module_kallsyms_lookup_name(const char *name)
/* Don't lock: we're in enough trouble already. */
preempt_disable();
- if ((colon = strchr(name, ':')) != NULL) {
+ if ((colon = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) {
if ((mod = find_module_all(name, colon - name, false)) != NULL)
ret = mod_find_symname(mod, colon+1);
} else {