diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-12-06 23:37:06 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-12-06 23:37:06 +0100 |
commit | d0300e5e8d2fb74852f8116f26546e12cfa66735 (patch) | |
tree | a6580aa74a0ebd7965dbc37767717b4f73dd9d79 /arch/powerpc/kernel/module_64.c | |
parent | Merge tag 'perf-core-for-mingo-4.16-20171206' of git://git.kernel.org/pub/scm... (diff) | |
parent | tooling/headers: Synchronize updated s390 and x86 UAPI headers (diff) | |
download | linux-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.c | 3 |
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]; |