5b95b6798da996e093567ebd103775fe3bc89d1e
[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 diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
28 index 5cf04888c581..3e26c6f7a191 100644
29 --- a/arch/arm/kernel/traps.c
30 +++ b/arch/arm/kernel/traps.c
31 @@ -793,7 +793,6 @@ void abort(void)
32 /* if that doesn't kill us, halt */
33 panic("Oops failed to kill thread");
34 }
35 -EXPORT_SYMBOL(abort);
36
37 void __init trap_init(void)
38 {
39 diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c
40 index cb79fba79d43..b88a8dd14933 100644
41 --- a/arch/m32r/kernel/traps.c
42 +++ b/arch/m32r/kernel/traps.c
43 @@ -122,7 +122,6 @@ void abort(void)
44 /* if that doesn't kill us, halt */
45 panic("Oops failed to kill thread");
46 }
47 -EXPORT_SYMBOL(abort);
48
49 void __init trap_init(void)
50 {
51 diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c
52 index 5f25b39f04d4..c4ac6043ebb0 100644
53 --- a/arch/unicore32/kernel/traps.c
54 +++ b/arch/unicore32/kernel/traps.c
55 @@ -298,7 +298,6 @@ void abort(void)
56 /* if that doesn't kill us, halt */
57 panic("Oops failed to kill thread");
58 }
59 -EXPORT_SYMBOL(abort);
60
61 void __init trap_init(void)
62 {
63 diff --git a/kernel/exit.c b/kernel/exit.c
64 index df0c91d5606c..995453d9fb55 100644
65 --- a/kernel/exit.c
66 +++ b/kernel/exit.c
67 @@ -1763,3 +1763,4 @@ __weak void abort(void)
68 /* if that doesn't kill us, halt */
69 panic("Oops failed to kill thread");
70 }
71 +EXPORT_SYMBOL(abort);
72 --
73 2.11.0
74