summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/module_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-12-06 23:37:06 +0100
committerIngo Molnar <mingo@kernel.org>2017-12-06 23:37:06 +0100
commitd0300e5e8d2fb74852f8116f26546e12cfa66735 (patch)
treea6580aa74a0ebd7965dbc37767717b4f73dd9d79 /arch/powerpc/kernel/module_64.c
parentMerge tag 'perf-core-for-mingo-4.16-20171206' of git://git.kernel.org/pub/scm... (diff)
parenttooling/headers: Synchronize updated s390 and x86 UAPI headers (diff)
downloadlinux-d0300e5e8d2fb74852f8116f26546e12cfa66735.tar.xz
linux-d0300e5e8d2fb74852f8116f26546e12cfa66735.zip
Merge branch 'perf/urgent' into perf/core, to pick up fixes and to refresh to v4.15
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/powerpc/kernel/module_64.c')
-rw-r--r--arch/powerpc/kernel/module_64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 0b0f89685b67..759104b99f9f 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -429,7 +429,8 @@ static unsigned long stub_for_addr(const Elf64_Shdr *sechdrs,
/* Find this stub, or if that fails, the next avail. entry */
stubs = (void *)sechdrs[me->arch.stubs_section].sh_addr;
for (i = 0; stub_func_addr(stubs[i].funcdata); i++) {
- BUG_ON(i >= num_stubs);
+ if (WARN_ON(i >= num_stubs))
+ return 0;
if (stub_func_addr(stubs[i].funcdata) == func_addr(addr))
return (unsigned long)&stubs[i];