diff options
author | Krzysztof Mazur <krzysiek@podlesie.net> | 2017-11-15 05:12:39 -0500 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-02-19 13:38:51 -0500 |
commit | 4d1a535b8ec5e74b42dfd9dc809142653b2597f6 (patch) | |
tree | 3b1544a45f63cc909a07952b722deb589ada4622 | |
parent | 288fb3d5683f5089fa1ba9258e4351170c1f0401 (diff) |
um: Use POSIX ucontext_t instead of struct ucontext
glibc 2.26 removed the 'struct ucontext' to "improve" POSIX compliance
and break programs, including User Mode Linux. Fix User Mode Linux
by using POSIX ucontext_t.
This fixes:
arch/um/os-Linux/signal.c: In function 'hard_handler':
arch/um/os-Linux/signal.c:163:22: error: dereferencing pointer to incomplete type 'struct ucontext'
mcontext_t *mc = &uc->uc_mcontext;
arch/x86/um/stub_segv.c: In function 'stub_segv_handler':
arch/x86/um/stub_segv.c:16:13: error: dereferencing pointer to incomplete type 'struct ucontext'
&uc->uc_mcontext);
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r-- | arch/um/os-Linux/signal.c | 2 | ||||
-rw-r--r-- | arch/x86/um/stub_segv.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index a86d7cc2c2d8..a5c0c909c48b 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c | |||
@@ -159,7 +159,7 @@ static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = { | |||
159 | 159 | ||
160 | static void hard_handler(int sig, siginfo_t *si, void *p) | 160 | static void hard_handler(int sig, siginfo_t *si, void *p) |
161 | { | 161 | { |
162 | struct ucontext *uc = p; | 162 | ucontext_t *uc = p; |
163 | mcontext_t *mc = &uc->uc_mcontext; | 163 | mcontext_t *mc = &uc->uc_mcontext; |
164 | unsigned long pending = 1UL << sig; | 164 | unsigned long pending = 1UL << sig; |
165 | 165 | ||
diff --git a/arch/x86/um/stub_segv.c b/arch/x86/um/stub_segv.c index 1518d2805ae8..fd6825537b97 100644 --- a/arch/x86/um/stub_segv.c +++ b/arch/x86/um/stub_segv.c | |||
@@ -10,7 +10,7 @@ | |||
10 | void __attribute__ ((__section__ (".__syscall_stub"))) | 10 | void __attribute__ ((__section__ (".__syscall_stub"))) |
11 | stub_segv_handler(int sig, siginfo_t *info, void *p) | 11 | stub_segv_handler(int sig, siginfo_t *info, void *p) |
12 | { | 12 | { |
13 | struct ucontext *uc = p; | 13 | ucontext_t *uc = p; |
14 | 14 | ||
15 | GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA), | 15 | GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA), |
16 | &uc->uc_mcontext); | 16 | &uc->uc_mcontext); |