ramips: preliminary support for 4.14
[openwrt/openwrt.git] / target / linux / generic / backport-4.14 / 081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch
1 From dc8635b78cd8669c37e230058d18c33af7451ab1 Mon Sep 17 00:00:00 2001
2 From: Andrew Morton <akpm@linux-foundation.org>
3 Date: Thu, 4 Jan 2018 16:17:56 -0800
4 Subject: [PATCH] kernel/exit.c: export abort() to modules
5
6 gcc -fisolate-erroneous-paths-dereference can generate calls to abort()
7 from modular code too.
8
9 [arnd@arndb.de: drop duplicate exports of abort()]
10 Link: http://lkml.kernel.org/r/20180102103311.706364-1-arnd@arndb.de
11 Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
12 Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
13 Cc: Arnd Bergmann <arnd@arndb.de>
14 Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
15 Cc: Russell King <rmk+kernel@armlinux.org.uk>
16 Cc: Jose Abreu <Jose.Abreu@synopsys.com>
17 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
18 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
19 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
20 ---
21 arch/arm/kernel/traps.c | 1 -
22 arch/m32r/kernel/traps.c | 1 -
23 arch/unicore32/kernel/traps.c | 1 -
24 kernel/exit.c | 1 +
25 4 files changed, 1 insertion(+), 3 deletions(-)
26
27 --- a/arch/arm/kernel/traps.c
28 +++ b/arch/arm/kernel/traps.c
29 @@ -790,7 +790,6 @@ void abort(void)
30 /* if that doesn't kill us, halt */
31 panic("Oops failed to kill thread");
32 }
33 -EXPORT_SYMBOL(abort);
34
35 void __init trap_init(void)
36 {
37 --- a/arch/m32r/kernel/traps.c
38 +++ b/arch/m32r/kernel/traps.c
39 @@ -122,7 +122,6 @@ void abort(void)
40 /* if that doesn't kill us, halt */
41 panic("Oops failed to kill thread");
42 }
43 -EXPORT_SYMBOL(abort);
44
45 void __init trap_init(void)
46 {
47 --- a/arch/unicore32/kernel/traps.c
48 +++ b/arch/unicore32/kernel/traps.c
49 @@ -298,7 +298,6 @@ void abort(void)
50 /* if that doesn't kill us, halt */
51 panic("Oops failed to kill thread");
52 }
53 -EXPORT_SYMBOL(abort);
54
55 void __init trap_init(void)
56 {
57 --- a/kernel/exit.c
58 +++ b/kernel/exit.c
59 @@ -1763,3 +1763,4 @@ __weak void abort(void)
60 /* if that doesn't kill us, halt */
61 panic("Oops failed to kill thread");
62 }
63 +EXPORT_SYMBOL(abort);